ufe  4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
codeWrapperContext.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/codeWrapperContext.h"
2 #ifndef _ufeCodeWrapperContext
3 #define _ufeCodeWrapperContext
4 // ===========================================================================
5 // Copyright 2023 Autodesk, Inc. All rights reserved.
6 //
7 // Use of this software is subject to the terms of the Autodesk license
8 // agreement provided at the time of installation or download, or which
9 // otherwise accompanies this software in either electronic or hard copy form.
10 // ===========================================================================
11 
12 #include "codeWrapper.h"
13 
14 #include <string>
15 #include <vector>
16 
17 UFE_NS_DEF {
18 
19 class Selection;
20 
25 {
26 public:
32  const CodeWrapperContainer& container,
33  const std::string& subOperation);
35 
36  // Do not allow copying since the CodeWrapper prelude and cleanup
37  // must only be executed once.
38  CodeWrapperContext(const CodeWrapperContext&) = delete;
39  const CodeWrapperContext& operator=(const CodeWrapperContext&) = delete;
40 
42  const CodeWrapperContext& operator=(CodeWrapperContext&&) = delete;
43 
46  void cleanup();
47 
48 private:
49  // This function is called during construction.
50  void prelude();
51 
52  // The CodeWrapperContext can only be created with a valid container of
53  // code wrapper but does not manage the lifetime of that container. The
54  // container is held by another class, for example a BatchCompositeCommand,
55  // which is also the class that uses the context. See BatchCompositeCommand.cpp
56  // for an example.
57  //
58  // Note: we need to keep it as a pointer so we can clear it out when cleanup()
59  // is explicitly called.
62 };
63 
64 }
65 
66 #endif /* _ufeCodeWrapperContext */
std::string string(const Path &path)
const CodeWrapperContainer * fContainer
A container of multiple CodeWrapper, one per UFE run-time that is involved in an operation.
Definition: codeWrapper.h:47
#define UFE_NS_DEF
Definition: ufe.h:35
Wraps execution of other code by calling the prelude and cleanup code wrappers for given sub-operatio...
#define UFE_SDK_DECL
Definition: ufeExport.h:36