Navigation
API > API/Plugins > API/Plugins/UAFAnimGraph
Execution Context
The execution context aims to centralize the trait query API. It is meant to be bound to a graph instance and re-used by the nodes/traits within.
| Name | FExecutionContext |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/UAF/UAFAnimGraph/Source/UAFAnimGraph/Public/TraitCore/ExecutionContext.h |
| Include Path | #include "TraitCore/ExecutionContext.h" |
Syntax
struct FExecutionContext
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FExecutionContext
(
FAnimNextGraphInstance& InGraphInstance |
Creates an execution context and binds it to the specified graph instance. | TraitCore/ExecutionContext.h | |
| Creates an unbound execution context. | TraitCore/ExecutionContext.h | ||
FExecutionContext
(
const FExecutionContext& |
No copy or move. | TraitCore/ExecutionContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FExecutionContext() |
Derived types can control various features. | TraitCore/ExecutionContext.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FreeScopedInterfaceEntryStackHead | Private::FScopedInterfaceEntry * | The head pointer of the free scoped interface entry stack Entries are allocated from the memstack and are re-used in LIFO since they'll be warmer in the CPU cache | TraitCore/ExecutionContext.h | |
| NodeTemplateRegistry | const FNodeTemplateRegistry & | Cached references to the registries we need. | TraitCore/ExecutionContext.h | |
| RootGraphInstance | FAnimNextGraphInstance * | Root graph instance we are bound to. | TraitCore/ExecutionContext.h | |
| ScopedInterfaceStackHead | Private::FScopedInterfaceEntry * | The head pointer of the scoped interface stack. | TraitCore/ExecutionContext.h | |
| TraitRegistry | const FTraitRegistry & | TraitCore/ExecutionContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTraitPtr AllocateNodeInstance
(
const FWeakTraitPtr& ParentBinding, |
Allocates a new node instance from a trait handle If the desired trait lives in the current parent, a weak handle to it will be returned | TraitCore/ExecutionContext.h | |
FTraitPtr AllocateNodeInstance
(
const FTraitBinding& ParentBinding, |
Allocates a new node instance from a trait handle If the desired trait lives in the current parent, a weak handle to it will be returned | TraitCore/ExecutionContext.h | |
FTraitPtr AllocateNodeInstance
(
FAnimNextGraphInstance& GraphInstance, |
Allocates a new node instance from a trait handle using the specified graph instance If the desired trait lives in the current parent, a weak handle to it will be returned | TraitCore/ExecutionContext.h | |
void BindTo
(
const FWeakTraitPtr& TraitPtr |
Binds the execution context to the graph instance that owns the specified trait if it differs from the currently bound instance. | TraitCore/ExecutionContext.h | |
void BindTo
(
FAnimNextGraphInstance& InGraphInstance |
Binds the execution context to the specified graph instance if it differs from the currently bound instance. | TraitCore/ExecutionContext.h | |
void ForEachComponent
(
TFunctionRef< bool(FUAFGraphInstanceComponent&)> InFunction |
Iterates each of the graph instance components. | TraitCore/ExecutionContext.h | |
void ForEachScopedInterface
(
TFunctionRef< bool(TTraitBinding< ScopedTraitInterface >&Binding)> InFunction |
When found, the provided callback will be called with the scoped interface binding. | TraitCore/ExecutionContext.h | |
const TWeakObjectPtr< const USkeletalMeshComponent > GetBindingObject() |
TraitCore/ExecutionContext.h | ||
ComponentType & GetComponent () |
Returns a typed graph instance component, creating it lazily the first time it is queried. | TraitCore/ExecutionContext.h | |
FRigVMDrawInterface * GetDebugDrawInterface() |
TraitCore/ExecutionContext.h | ||
const UObject * GetHostObject() |
Owner object our module instance belongs to. Usually the Anim Next Component. This access is NOT thread-safe. | TraitCore/ExecutionContext.h | |
const FTransform GetHostTransform () |
The world transform of our host. | TraitCore/ExecutionContext.h | |
FMemStack & GetMemStack() |
Returns the local thread memstack. | TraitCore/ExecutionContext.h | |
FAnimNextGraphInstance & GetRootGraphInstance() |
Returns the bound root graph instance. | TraitCore/ExecutionContext.h | |
bool GetScopedInterface
(
TTraitBinding< ScopedTraitInterface >& OutBinding |
If no such trait exists, false is returned. | TraitCore/ExecutionContext.h | |
bool GetStack
(
const FWeakTraitPtr& TraitPtr, |
Returns a trait stack binding to the stack that contains the specified trait pointer. | TraitCore/ExecutionContext.h | |
bool HasScopedInterfaces() |
Returns whether or not any scoped interfaces have been pushed onto our stack. | TraitCore/ExecutionContext.h | |
bool IsBound() |
Returns whether or not this execution context is bound to a graph instance. | TraitCore/ExecutionContext.h | |
bool IsBoundTo
(
const FAnimNextGraphInstance& InGraphInstance |
Returns whether or not this execution context is bound to the specified graph instance Returns true if the root graphs match | TraitCore/ExecutionContext.h | |
bool PopScopedInterface
(
const FTraitBinding& Binding |
Failure can occur if the scoped interface is missing or not present on top of the stack. | TraitCore/ExecutionContext.h | |
bool PopStackScopedInterfaces
(
const FTraitBinding& Binding |
Pops all scoped interfaces owned by the trait stack that contains the specified trait An interface can only be popped if it lives at the top of the stack Returns true if any scoped interfaces were popped, false otherwise | TraitCore/ExecutionContext.h | |
bool PopStackScopedInterfaces
(
const FTraitStackBinding& StackBinding |
Pops all scoped interfaces owned by the specified trait stack An interface can only be popped if it lives at the top of the stack Returns true if any scoped interfaces were popped, false otherwise | TraitCore/ExecutionContext.h | |
void PushOptionalScopedInterface
(
bool bCondition, |
Pushed an optional scoped interface with the specified interface owned by the specified trait The scoped interface is only pushed if the condition is true Scoped interfaces automatically pop when the owned trait finishes its update | TraitCore/ExecutionContext.h | |
void PushScopedInterface
(
const FTraitBinding& Binding |
The following functions allow for scope interface management and queries Scoped interfaces live on a stack within the execution context A parent node can publish a scoped interface that its children can query for Pushed a scoped interface with the specified interface owned by the specified trait Scoped interfaces automatically pop when the owned trait finishes its update | TraitCore/ExecutionContext.h | |
virtual void RaiseInputTraitEvent
(
FAnimNextTraitEventPtr Event |
Raises an input trait event Behavior is traversal dependent, see the derived type for your current traversal (e.g. IUpdate) Default behavior asserts | TraitCore/ExecutionContext.h | |
virtual void RaiseOutputTraitEvent
(
FAnimNextTraitEventPtr Event |
Raises an output trait event Behavior is traversal dependent, see the derived type for your current traversal (e.g. IUpdate) Default behavior asserts | TraitCore/ExecutionContext.h | |
void ReleaseNodeInstance
(
FTraitPtr& NodePtr |
Decrements the reference count of the provided node pointer and releases it if there are no more references remaining, reseting the pointer in the process | TraitCore/ExecutionContext.h | |
void SetBindingObject
(
const TWeakObjectPtr< const USkeletalMeshComponent >& InBindingObject |
Returns the skeletal mesh component associated to the graph execution. | TraitCore/ExecutionContext.h | |
ComponentType * TryGetComponent() |
Returns a typed graph instance component pointer if found or nullptr otherwise. | TraitCore/ExecutionContext.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FExecutionContext & operator=
(
const FExecutionContext& |
TraitCore/ExecutionContext.h |