Navigation
API > API/Plugins > API/Plugins/UAFAnimGraph
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!
| Name | FTraitPtr |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/UAF/UAFAnimGraph/Source/UAFAnimGraph/Public/TraitCore/TraitPtr.h |
| Include Path | #include "TraitCore/TraitPtr.h" |
Syntax
struct FTraitPtr
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTraitPtr
(
FNodeInstance* InNodeInstance, |
Constructs a pointer handle to the provided instance. | TraitCore/TraitPtr.h | |
FTraitPtr
(
FNodeInstance* InNodeInstance, |
Constructs a pointer handle to the provided instance. | TraitCore/TraitPtr.h | |
FTraitPtr
(
const FWeakTraitPtr& TraitPtr |
TraitCore/TraitPtr.h | ||
| TraitCore/TraitPtr.h | |||
constexpr FTraitPtr () |
Constructs an invalid pointer handle. | TraitCore/TraitPtr.h | |
| TraitCore/TraitPtr.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTraitPtr() |
TraitCore/TraitPtr.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PackedPointerAndFlags | uintptr_t | Packed pointer value contains a pointer along with flags in the alignment bits The pointer part points to a node instance | TraitCore/TraitPtr.h | |
| TraitIndex | uint32 | TraitCore/TraitPtr.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNodeInstance * GetNodeInstance() |
Returns a pointer to the node instance. | TraitCore/TraitPtr.h | |
uint32 GetTraitIndex() |
Returns the trait index this pointer handle references. | TraitCore/TraitPtr.h | |
bool IsValid() |
Returns true when the pointer is valid, false otherwise. | TraitCore/TraitPtr.h | |
bool IsWeak() |
Returns true if this pointer handle is weak, false otherwise. | TraitCore/TraitPtr.h | |
void Reset() |
Clears the handle and renders it invalid. | TraitCore/TraitPtr.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FTraitPtr& RHS |
TraitCore/TraitPtr.h | ||
bool operator!=
(
const FWeakTraitPtr& RHS |
TraitCore/TraitPtr.h | ||
FTraitPtr & operator=
(
const FWeakTraitPtr& TraitPtr |
TraitCore/TraitPtr.h | ||
| TraitCore/TraitPtr.h | |||
| TraitCore/TraitPtr.h | |||
bool operator==
(
const FTraitPtr& RHS |
Equality and inequality tests. | TraitCore/TraitPtr.h | |
bool operator==
(
const FWeakTraitPtr& RHS |
TraitCore/TraitPtr.h |