UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Anim::TNamedValueArray< InAllocatorType, InElementType > Struct Template Reference

#include <NamedValueArray.h>

+ Inheritance diagram for UE::Anim::TNamedValueArray< InAllocatorType, InElementType >:

Classes

struct  FElementSortPredicate
 

Public Types

typedef InAllocatorType AllocatorType
 
typedef InElementType ElementType
 

Public Member Functions

template<typename... ArgTypes>
void Add (ArgTypes &&... Args)
 
void AppendNames (TConstArrayView< FName > InNameArray)
 
void AppendNames (std::initializer_list< const FName > InInputArgs)
 
void Empty ()
 
void Reserve (int32 InNumElements)
 
bool HasElement (FName InName) const
 
template<typename PredicateType >
void ForEachElement (PredicateType InPredicate) const
 
int32 Num () const
 
int32 Max () const
 
void Shrink ()
 

Protected Member Functions

void SortElementsIfRequired () const
 
void CheckSorted () const
 
void CheckDuplicates () const
 
int32 IndexOf (FName InName) const
 
const ElementTypeFind (FName InName) const
 
ElementTypeFind (FName InName)
 

Protected Attributes

TArray< ElementType, AllocatorTypeElements
 
bool bSorted = false
 

Friends

struct FNamedValueArrayUtils
 

Detailed Description

template<typename InAllocatorType, typename InElementType>
struct UE::Anim::TNamedValueArray< InAllocatorType, InElementType >

Container of lazily-sorted name/value pairs. Used to perform efficient merge operations. Assumes that InElementType has an accessible member: FName Name.

Member Typedef Documentation

◆ AllocatorType

◆ ElementType

Member Function Documentation

◆ Add()

template<typename... ArgTypes>
void UE::Anim::TNamedValueArray< InAllocatorType, InElementType >::Add ( ArgTypes &&...  Args)
inline

Add a named element. Note that this should only really be used when building a fresh value array, as using this during runtime can introduce duplicate values. Asserts in debug builds if duplicate values are present

◆ AppendNames() [1/2]

void UE::Anim::TNamedValueArray< InAllocatorType, InElementType >::AppendNames ( std::initializer_list< const FName InInputArgs)
inline

Add an array of named elements. Note that this should only really be used when building a fresh array, as using this during runtime can introduce duplicate values. Asserts in debug builds if duplicate values are present

◆ AppendNames() [2/2]

Add an array of named elements. Note that this should only really be used when building a fresh array, as using this during runtime can introduce duplicate values. Asserts in debug builds if duplicate values are present

◆ CheckDuplicates()

void UE::Anim::TNamedValueArray< InAllocatorType, InElementType >::CheckDuplicates ( ) const
inlineprotected

◆ CheckSorted()

◆ Empty()

Reset the internal allocations

◆ Find() [1/2]

Finds the element with the specified name

◆ Find() [2/2]

Finds the element with the specified name (const)

◆ ForEachElement()

Iterate over each element calling InPredicate for each. Predicate: (const ElementType&) -> void

◆ HasElement()

Check whether an element is present for the supplied name Note that this performs a binary search per-call.

Parameters
InNamethe name of the element to check
Returns
true if an element with the supplied name is present

◆ IndexOf()

Finds index of the element with the specified name, disregarding enabled state

◆ Max()

Returns
the max number of elements reserved in the array

◆ Num()

Returns
the number of elements

◆ Reserve()

Reserves memory for InNumElements

◆ Shrink()

Compacts the memory for the elements based on what was actually used

◆ SortElementsIfRequired()

void UE::Anim::TNamedValueArray< InAllocatorType, InElementType >::SortElementsIfRequired ( ) const
inlineprotected

Friends And Related Symbol Documentation

◆ FNamedValueArrayUtils

Member Data Documentation

◆ bSorted

◆ Elements


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