UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Anim::TAttributeContainer< BoneIndexType, InAllocator > Struct Template Reference

#include <AttributesContainer.h>

Public Member Functions

template<typename OtherAllocator >
void CopyFrom (const TAttributeContainer< BoneIndexType, OtherAllocator > &Other)
 
template<class OtherBoneIndexType , typename OtherAllocator >
void CopyFrom (const TAttributeContainer< OtherBoneIndexType, OtherAllocator > &Other, const TMap< OtherBoneIndexType, BoneIndexType > &IndexMapping)
 
template<class OtherBoneIndexType , typename OtherAllocator >
void CopyFrom (const TAttributeContainer< OtherBoneIndexType, OtherAllocator > &Other, const FBoneContainer &BoneContainer)
 
void CopyFrom (const TAttributeContainer< BoneIndexType, InAllocator > &Other)
 
void MoveFrom (TAttributeContainer< BoneIndexType, InAllocator > &Other)
 
bool ContainsData () const
 
void Empty ()
 
bool operator!= (const TAttributeContainer< BoneIndexType, InAllocator > &Other)
 
template<typename AttributeType >
AttributeType * Add (const FAttributeId &InAttributeId, const AttributeType &Attribute)
 
uint8Add (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId)
 
template<typename AttributeType >
AttributeType * FindOrAdd (const FAttributeId &InAttributeId)
 
uint8FindOrAdd (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId)
 
template<typename AttributeType >
AttributeType * Find (const FAttributeId &InAttributeId)
 
uint8Find (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId)
 
template<typename AttributeType >
const AttributeType * Find (const FAttributeId &InAttributeId) const
 
const uint8Find (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId) const
 
template<typename AttributeType >
AttributeType & FindChecked (const FAttributeId &InAttributeId)
 
template<typename AttributeType >
const AttributeType & FindChecked (const FAttributeId &InAttributeId) const
 
template<typename AttributeType >
int32 IndexOfByKey (const FAttributeId &InAttributeId) const
 
int32 IndexOfByKey (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId) const
 
template<typename AttributeType >
bool Remove (const FAttributeId &InAttributeId)
 
bool Remove (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId)
 
template<typename AttributeType >
bool RemoveAll ()
 
bool RemoveAll (const UScriptStruct *InScriptStruct, const FAttributeId &InAttributeId)
 
int32 FindTypeIndex (const UScriptStruct *InScriptStruct) const
 
const TArray< FAttributeId > & GetKeys (int32 TypeIndex) const
 
const TArray< TWrappedAttribute< InAllocator > > & GetValues (int32 TypeIndex) const
 
const TArray< TWeakObjectPtr< UScriptStruct > > & GetUniqueTypes () const
 
template<typename ArrayAllocator >
bool GetAllKeyNames (TArray< FName, ArrayAllocator > &OutAttributeKeyNames) const
 
const TArray< int32 > & GetUniqueTypedBoneIndices (int32 TypeIndex) const
 
int32 Num () const
 

Protected Member Functions

TArray< TWrappedAttribute< InAllocator > > & GetValuesInternal (int32 TypeIndex)
 
TArray< FAttributeId > & GetKeysInternal (int32 TypeIndex)
 
int32 FindOrAddTypeIndex (const UScriptStruct *InScriptStruct)
 

Protected Attributes

TArray< TArray< int32 > > UniqueTypedBoneIndices
 
TArray< TArray< FAttributeId > > AttributeIdentifiers
 
TArray< TArray< TWrappedAttribute< InAllocator > > > Values
 
TArray< TWeakObjectPtr< UScriptStruct > > UniqueTypes
 

Friends

template<typename OtherBoneIndexType , typename OtherAllocator >
struct TAttributeContainer
 
template<class OtherBoneIndexType , typename OtherAllocator >
struct TAttributeContainerAccessor
 

Detailed Description

template<class BoneIndexType, typename InAllocator>
struct UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >

Runtime container for Animation Attributes, providing a TMap like interface. Used in FStack

Member Function Documentation

◆ Add() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
AttributeType * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Add ( const FAttributeId InAttributeId,
const AttributeType &  Attribute 
)
inline

Adds a new attribute type/value entry of the specified underlying AttributeType.

Parameters
InAttributeIdKey to be used for the entry
AttributeValue for the new entry
Returns
The ptr to the added and populated entry, to be used for populating the data, nullptr if adding it failed

◆ Add() [2/2]

template<class BoneIndexType , typename InAllocator >
uint8 * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Add ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
)
inline

Adds a new attribute type/value entry for the specified InScriptType.

Parameters
InScriptStructUScriptStruct (type) for the entry
InAttributeIdKey to be used for the entry
Returns
The ptr to the added entry, to be used for populating the data, nullptr if adding it failed

◆ ContainsData()

template<class BoneIndexType , typename InAllocator >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::ContainsData ( ) const
inline

Returns whether or not any this container contains any entries

◆ CopyFrom() [1/4]

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::CopyFrom ( const TAttributeContainer< BoneIndexType, InAllocator > &  Other)
inline

Copies all contained data from another Container instance using the same memory allocator

Ensure a copy to self is never performed

◆ CopyFrom() [2/4]

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::CopyFrom ( const TAttributeContainer< BoneIndexType, OtherAllocator > &  Other)
inline

Copies all contained data from another Container instance using another memory allocator

◆ CopyFrom() [3/4]

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::CopyFrom ( const TAttributeContainer< OtherBoneIndexType, OtherAllocator > &  Other,
const FBoneContainer BoneContainer 
)
inline

◆ CopyFrom() [4/4]

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::CopyFrom ( const TAttributeContainer< OtherBoneIndexType, OtherAllocator > &  Other,
const TMap< OtherBoneIndexType, BoneIndexType > &  IndexMapping 
)
inline

◆ Empty()

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Empty ( )
inline

Cleans out all contained entries and types

◆ Find() [1/4]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
AttributeType * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Find ( const FAttributeId InAttributeId)
inline

Tries to find a attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
The ptr to the entry, to be used for modifying the data, nullptr if it was not found

◆ Find() [2/4]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
const AttributeType * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Find ( const FAttributeId InAttributeId) const
inline

Tries to find a attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
The ptr to the constant entry, nullptr if it was not found

◆ Find() [3/4]

template<class BoneIndexType , typename InAllocator >
uint8 * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Find ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
)
inline

Tries to find a attribute type/value entry for the specified InScriptType.

Parameters
InScriptStructUScriptStruct (type) for the entry
InAttributeIdKey to be used for seraching the entry
Returns
The ptr to the entry, to be used for modifying the data, nullptr if it was not found

◆ Find() [4/4]

template<class BoneIndexType , typename InAllocator >
const uint8 * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Find ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
) const
inline

Tries to find a attribute type/value entry for the specified InScriptType.

Parameters
InScriptStructUScriptStruct (type) for the entry
InAttributeIdKey to be used for seraching the entry
Returns
The ptr to the constant entry, nullptr if it was not found

◆ FindChecked() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
AttributeType & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindChecked ( const FAttributeId InAttributeId)
inline

Tries to find a attribute type/value entry of the specified AttributeType. Asserts when the attribute was not found.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
Reference to the entry

◆ FindChecked() [2/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
const AttributeType & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindChecked ( const FAttributeId InAttributeId) const
inline

Tries to find a attribute type/value entry of the specified AttributeType. Asserts when the attribute was not found.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
Reference to the entry

◆ FindOrAdd() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
AttributeType * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindOrAdd ( const FAttributeId InAttributeId)
inline

Adds, if not yet existing, a new attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey to be used for the entry
Returns
The ptr to the added/existing entry, to be used for populating the data, nullptr if adding it failed

◆ FindOrAdd() [2/2]

template<class BoneIndexType , typename InAllocator >
uint8 * UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindOrAdd ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
)
inline

Adds, if not yet existing, a new attribute type/value entry for the specified InScriptType.

Parameters
InScriptStructUScriptStruct (type) for the entry
InAttributeIdKey to be used for the entry
Returns
The ptr to the added/existing entry, to be used for populating the data, nullptr if adding it failed

◆ FindOrAddTypeIndex()

template<class BoneIndexType , typename InAllocator >
int32 UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindOrAddTypeIndex ( const UScriptStruct InScriptStruct)
inlineprotected

Find or add a new root-level entry for the provided attribute data type, returning the index into the arrays representing the type

◆ FindTypeIndex()

template<class BoneIndexType , typename InAllocator >
int32 UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::FindTypeIndex ( const UScriptStruct InScriptStruct) const
inline

◆ GetAllKeyNames()

template<class BoneIndexType , typename InAllocator >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetAllKeyNames ( TArray< FName, ArrayAllocator > &  OutAttributeKeyNames) const
inline

◆ GetKeys()

template<class BoneIndexType , typename InAllocator >
const TArray< FAttributeId > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetKeys ( int32  TypeIndex) const
inline

◆ GetKeysInternal()

template<class BoneIndexType , typename InAllocator >
TArray< FAttributeId > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetKeysInternal ( int32  TypeIndex)
inlineprotected

◆ GetUniqueTypedBoneIndices()

template<class BoneIndexType , typename InAllocator >
const TArray< int32 > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetUniqueTypedBoneIndices ( int32  TypeIndex) const
inline

◆ GetUniqueTypes()

template<class BoneIndexType , typename InAllocator >
const TArray< TWeakObjectPtr< UScriptStruct > > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetUniqueTypes ( ) const
inline

◆ GetValues()

template<class BoneIndexType , typename InAllocator >
const TArray< TWrappedAttribute< InAllocator > > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetValues ( int32  TypeIndex) const
inline

◆ GetValuesInternal()

template<class BoneIndexType , typename InAllocator >
TArray< TWrappedAttribute< InAllocator > > & UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::GetValuesInternal ( int32  TypeIndex)
inlineprotected

◆ IndexOfByKey() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
int32 UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::IndexOfByKey ( const FAttributeId InAttributeId) const
inline

Tries to find and return the indedx of a attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
Index to the entry, INDEX_NONE if not found

◆ IndexOfByKey() [2/2]

template<class BoneIndexType , typename InAllocator >
int32 UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::IndexOfByKey ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
) const
inline

Tries to find and return the indedx of a attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey to be used for seraching the entry
Returns
Index to the entry, INDEX_NONE if not found

◆ MoveFrom()

template<class BoneIndexType , typename InAllocator >
void UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::MoveFrom ( TAttributeContainer< BoneIndexType, InAllocator > &  Other)
inline

Moves all contained data from another Container instance, once moved the other Container instance data is invalid

◆ Num()

template<class BoneIndexType , typename InAllocator >
int32 UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Num ( ) const
inline

◆ operator!=()

template<class BoneIndexType , typename InAllocator >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::operator!= ( const TAttributeContainer< BoneIndexType, InAllocator > &  Other)
inline

Number of types should match

Other should contain ThisType

Number of entries for type should match

Other should contain ThisAttributeId

Other value should match ThisAttributeValue

◆ Remove() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Remove ( const FAttributeId InAttributeId)
inline

Removes, if existing, an attribute type/value entry of the specified AttributeType.

Parameters
InAttributeIdKey of the entry to be removed
Returns
Whether or not the removal was succesful

◆ Remove() [2/2]

template<class BoneIndexType , typename InAllocator >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Remove ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
)
inline

Removes, if existing, an attribute type/value entry for the specified InScriptType.

Parameters
InAttributeIdKey of the entry to be removed
Returns
Whether or not the removal was succesful

◆ RemoveAll() [1/2]

template<class BoneIndexType , typename InAllocator >
template<typename AttributeType >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::RemoveAll ( )
inline

Removes all, if existing, an attribute type/value entries of the specified AttributeType.

Returns
Whether or not the removal was succesful

◆ RemoveAll() [2/2]

template<class BoneIndexType , typename InAllocator >
bool UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::RemoveAll ( const UScriptStruct InScriptStruct,
const FAttributeId InAttributeId 
)
inline

Removes all, if existing, an attribute type/value entries for the specified InScriptType.

Returns
Whether or not the removal was succesful

Friends And Related Symbol Documentation

◆ TAttributeContainer

◆ TAttributeContainerAccessor

template<class BoneIndexType , typename InAllocator >
friend struct TAttributeContainerAccessor
friend

Member Data Documentation

◆ AttributeIdentifiers

template<class BoneIndexType , typename InAllocator >
TArray<TArray<FAttributeId> > UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::AttributeIdentifiers
protected

◆ UniqueTypedBoneIndices

template<class BoneIndexType , typename InAllocator >
TArray<TArray<int32> > UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::UniqueTypedBoneIndices
protected

Unique bone indices for all contained entries of a specific attribute type

◆ UniqueTypes

template<class BoneIndexType , typename InAllocator >
TArray<TWeakObjectPtr<UScriptStruct> > UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::UniqueTypes
protected

◆ Values

template<class BoneIndexType , typename InAllocator >
TArray<TArray<TWrappedAttribute<InAllocator> > > UE::Anim::TAttributeContainer< BoneIndexType, InAllocator >::Values
protected

The documentation for this struct was generated from the following file: