ufe 5.5
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.11-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
18
19class Selection;
20
25{
26public:
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.
40
43
46 void cleanup();
47
48private:
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 */
A container of multiple CodeWrapper, one per UFE run-time that is involved in an operation.
Definition: codeWrapper.h:48
Wraps execution of other code by calling the prelude and cleanup code wrappers for given sub-operatio...
CodeWrapperContext(CodeWrapperContext &&)=delete
const CodeWrapperContext & operator=(const CodeWrapperContext &)=delete
CodeWrapperContext(const CodeWrapperContainer &container, const std::string &subOperation)
Creates a context that immediately calls all the prelude functions of the code wrapper kept in the gi...
CodeWrapperContext(const CodeWrapperContext &)=delete
const CodeWrapperContext & operator=(CodeWrapperContext &&)=delete
const CodeWrapperContainer * fContainer
void cleanup()
Invoke the cleanup of the wrappers immediately, before the destructor. After this call,...
std::string string(const Path &path)
#define UFE_NS_DEF
Definition: ufe.h:35
#define UFE_SDK_DECL
Definition: ufeExport.h:36