Navigation
API > API/Plugins > API/Plugins/AnimNext > API/Plugins/AnimNext/TraitCore
References
| Module | AnimNext |
| Header | /Engine/Plugins/Experimental/AnimNext/Source/AnimNext/Public/TraitCore/TraitPtr.h |
| Include | #include "TraitCore/TraitPtr.h" |
Syntax
struct FTraitPtr
Remarks
Trait Pointer A trait pointer represents a shared pointer to allocated instance data. It manages reference counting. It points to a FTraitInstanceData or FNodeInstance when resolved.
A node pointer can also be weak, meaning that it does not update reference counting. Note that weak pointers will point to garbage if the trait instance is destroyed.
Weak trait pointers should be used carefully!
Constructors
| Type | Name | Description | |
|---|---|---|---|
| constexpr | FTraitPtr () |
Constructs an invalid pointer handle. | |
FTraitPtr
(
const FWeakTraitPtr& TraitPtr |
|||
FTraitPtr
(
FNodeInstance* InNodeInstance, |
Constructs a pointer handle to the provided instance. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~FTraitPtr () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FNodeInstance * | Returns a pointer to the node instance. | ||
| uint32 | Returns the trait index this pointer handle references. | ||
| bool | IsValid () |
Returns true when the pointer is valid, false otherwise. | |
| bool | IsWeak () |
Returns true if this pointer handle is weak, false otherwise. | |
| void | Reset () |
Clears the handle and renders it invalid. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const FTraitPtr& RHS |
||
| bool | operator!=
(
const FWeakTraitPtr& RHS |
||
| FTraitPtr & | operator=
(
const FWeakTraitPtr& TraitPtr |
||
| FTraitPtr & | |||
| FTraitPtr & | |||
| bool | operator==
(
const FTraitPtr& RHS |
Equality and inequality tests. | |
| bool | operator==
(
const FWeakTraitPtr& RHS |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EFlags | Various flags stored in the pointer alignment bits, assumes an alignment of at least 4 bytes. |