Navigation
API > API/Plugins > API/Plugins/PCG
Allow to set the current context for the current thread. The context can then be queryable with "FPCGContext::GetContextForThread". Scopes can be nested, as we store the previous context to restore it on scope destruction. Be very careful in the scope nesting, scopes need to be destroyed in order (ScopeA ctor -> ScopeB ctor -> ScopeB dtor -> ScopeA dtor).
| Name | FPCGContextScope |
| Type | struct |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/PCGContext.h |
| Include Path | #include "PCGContext.h" |
Syntax
struct FPCGContextScope
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPCGContextScope
(
FPCGContext* InContext |
PCGContext.h | ||
FPCGContextScope
(
const FPCGContextScope& |
Non-copyable, non-moveable. | PCGContext.h | |
| PCGContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FPCGContextScope() |
PCGContext.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PreviousContext | FPCGContext * | PCGContext.h | ||
| ThisContext | FPCGContext * | Keep this context to have some verification check that scopes are not destroyed in the wrong order. | PCGContext.h |
Functions
Public
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPCGContextScope & operator=
(
const FPCGContextScope& |
PCGContext.h | ||
| PCGContext.h |