Navigation
API > API/Plugins > API/Plugins/AnimNext > API/Plugins/AnimNext/TraitCore
Inheritance Hierarchy
- FExecutionContext
- FEvaluateTraversalContext
- FUpdateTraversalContext
References
| Module | AnimNext |
| Header | /Engine/Plugins/Experimental/AnimNext/Source/AnimNext/Public/TraitCore/ExecutionContext.h |
| Include | #include "TraitCore/ExecutionContext.h" |
Syntax
struct FExecutionContext
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FMemStack & | MemStack | The memstack of the local thread. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Creates an unbound execution context. | |||
FExecutionContext
(
FAnimNextGraphInstancePtr& InGraphInstance |
Creates an execution context and binds it to the specified graph instance. | ||
FExecutionContext
(
FAnimNextGraphInstance& InGraphInstance |
Creates an execution context and binds it to the specified graph instance. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Derived types can control various features. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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 | |
| 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 | |
| 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 | |
| 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. | |
| void | BindTo
(
FAnimNextGraphInstance& InGraphInstance |
Binds the execution context to the specified graph instance if it differs from the currently bound instance. | |
| void | BindTo
(
const FAnimNextGraphInstancePtr& InGraphInstance |
Binds the execution context to the specified graph instance if it differs from the currently bound instance. | |
| void | ForEachScopedInterface
(
TFunctionRef< bool(TTraitBinding< ScopedTraitInterface >&Binding)> InFunction |
When found, the provided callback will be called with the scoped interface binding. | |
| ComponentType & | GetComponent () |
Returns a typed graph instance component, creating it lazily the first time it is queried. | |
| GraphInstanceComponentMapType::TConstIterator | Returns const iterators to the graph instance component container. | ||
| FMemStack & | GetMemStack () |
Returns the local thread memstack. | |
| FAnimNextGraphInstance & | Returns the bound root graph instance. | ||
| bool | GetScopedInterface
(
TTraitBinding< ScopedTraitInterface >& OutBinding |
If no such trait exists, false is returned. | |
| bool | GetStack
(
const FWeakTraitPtr& TraitPtr, |
Returns a trait stack binding to the stack that contains the specified trait pointer. | |
| bool | Returns whether or not any scoped interfaces have been pushed onto our stack. | ||
| bool | IsBound () |
Returns whether or not this execution context is bound to a graph instance. | |
| 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 | |
| bool | IsBoundTo
(
const FAnimNextGraphInstancePtr& InGraphInstance |
Returns whether or not this execution context is bound to the specified graph instance Returns true if the root graphs match | |
| bool | PopScopedInterface
(
const FTraitBinding& Binding |
Failure can occur if the scoped interface is missing or not present on top of the stack. | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| ComponentType * | Returns a typed graph instance component pointer if found or nullptr otherwise. |