UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TScriptSparseSet< Allocator > Class Template Reference

#include <ScriptSparseSet.h>

Public Types

using IntrusiveUnsetOptionalStateType = TScriptSparseSet
 

Public Member Functions

 TScriptSparseSet ()
 
 TScriptSparseSet (FIntrusiveUnsetOptionalState Tag)
 
bool operator== (FIntrusiveUnsetOptionalState Tag) const
 
bool IsValidIndex (int32 Index) const
 
bool IsEmpty () const
 
bool IsCompact () const
 
int32 Num () const
 
int32 NumUnchecked () const
 
int32 Max () const
 
int32 GetMaxIndex () const
 
voidGetData (int32 Index, const FScriptSparseSetLayout &Layout)
 
const voidGetData (int32 Index, const FScriptSparseSetLayout &Layout) const
 
void MoveAssign (TScriptSparseSet &Other, const FScriptSparseSetLayout &Layout)
 
void Empty (int32 Slack, const FScriptSparseSetLayout &Layout)
 
void RemoveAt (int32 Index, const FScriptSparseSetLayout &Layout)
 
int32 AddUninitialized (const FScriptSparseSetLayout &Layout)
 
void RemoveAtUninitialized (const FScriptSparseSetLayout &Layout, int32 Index)
 
void CommitLastUninitialized (const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
void CommitAllUninitialized (const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
void Rehash (const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
int32 FindIndex (const void *Element, const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn) const
 
int32 FindIndexByHash (const void *Element, const FScriptSparseSetLayout &Layout, uint32 KeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn) const
 
int32 FindOrAdd (const void *Element, const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn, TFunctionRef< void(void *)> ConstructFn)
 
void Add (const void *Element, const FScriptSparseSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn, TFunctionRef< void(void *)> ConstructFn, TFunctionRef< void(void *)> DestructFn)
 
 TScriptSparseSet (const TScriptSparseSet &)
 
void operator= (const TScriptSparseSet &)
 

Static Public Member Functions

static constexpr FScriptSparseSetLayout GetScriptLayout (int32 ElementSize, int32 ElementAlignment)
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Member Typedef Documentation

◆ IntrusiveUnsetOptionalStateType

template<typename Allocator >
using TScriptSparseSet< Allocator >::IntrusiveUnsetOptionalStateType = TScriptSparseSet

Constructor & Destructor Documentation

◆ TScriptSparseSet() [1/3]

◆ TScriptSparseSet() [2/3]

◆ TScriptSparseSet() [3/3]

Member Function Documentation

◆ Add()

template<typename Allocator >
void TScriptSparseSet< Allocator >::Add ( const void Element,
const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash,
TFunctionRef< bool(const void *, const void *)>  EqualityFn,
TFunctionRef< void(void *)>  ConstructFn,
TFunctionRef< void(void *)>  DestructFn 
)
inline

◆ AddUninitialized()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::AddUninitialized ( const FScriptSparseSetLayout Layout)
inline

Adds an uninitialized object to the set. The set will need rehashing at some point after this call to make it valid.

Returns
The index of the added element.

◆ CommitAllUninitialized()

template<typename Allocator >
void TScriptSparseSet< Allocator >::CommitAllUninitialized ( const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash 
)
inline

◆ CommitLastUninitialized()

template<typename Allocator >
void TScriptSparseSet< Allocator >::CommitLastUninitialized ( const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash 
)
inline

◆ Empty()

template<typename Allocator >
void TScriptSparseSet< Allocator >::Empty ( int32  Slack,
const FScriptSparseSetLayout Layout 
)
inline

◆ FindIndex()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::FindIndex ( const void Element,
const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash,
TFunctionRef< bool(const void *, const void *)>  EqualityFn 
) const
inline

◆ FindIndexByHash()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::FindIndexByHash ( const void Element,
const FScriptSparseSetLayout Layout,
uint32  KeyHash,
TFunctionRef< bool(const void *, const void *)>  EqualityFn 
) const
inline

◆ FindOrAdd()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::FindOrAdd ( const void Element,
const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash,
TFunctionRef< bool(const void *, const void *)>  EqualityFn,
TFunctionRef< void(void *)>  ConstructFn 
)
inline

◆ GetData() [1/2]

template<typename Allocator >
void * TScriptSparseSet< Allocator >::GetData ( int32  Index,
const FScriptSparseSetLayout Layout 
)
inline

◆ GetData() [2/2]

template<typename Allocator >
const void * TScriptSparseSet< Allocator >::GetData ( int32  Index,
const FScriptSparseSetLayout Layout 
) const
inline

◆ GetMaxIndex()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::GetMaxIndex ( ) const
inline

◆ GetScriptLayout()

template<typename Allocator >
static constexpr FScriptSparseSetLayout TScriptSparseSet< Allocator >::GetScriptLayout ( int32  ElementSize,
int32  ElementAlignment 
)
inlinestaticconstexpr

◆ IsCompact()

template<typename Allocator >
bool TScriptSparseSet< Allocator >::IsCompact ( ) const
inline

◆ IsEmpty()

template<typename Allocator >
bool TScriptSparseSet< Allocator >::IsEmpty ( ) const
inline

◆ IsValidIndex()

template<typename Allocator >
bool TScriptSparseSet< Allocator >::IsValidIndex ( int32  Index) const
inline

◆ Max()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::Max ( ) const
inline
Returns
The number of elements the set can hold before reallocation.

◆ MoveAssign()

template<typename Allocator >
void TScriptSparseSet< Allocator >::MoveAssign ( TScriptSparseSet< Allocator > &  Other,
const FScriptSparseSetLayout Layout 
)
inline

◆ Num()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::Num ( ) const
inline

◆ NumUnchecked()

template<typename Allocator >
int32 TScriptSparseSet< Allocator >::NumUnchecked ( ) const
inline

◆ operator=()

template<typename Allocator >
void TScriptSparseSet< Allocator >::operator= ( const TScriptSparseSet< Allocator > &  )
inline

◆ operator==()

template<typename Allocator >
bool TScriptSparseSet< Allocator >::operator== ( FIntrusiveUnsetOptionalState  Tag) const
inline

◆ Rehash()

template<typename Allocator >
void TScriptSparseSet< Allocator >::Rehash ( const FScriptSparseSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash 
)
inline

◆ RemoveAt()

template<typename Allocator >
void TScriptSparseSet< Allocator >::RemoveAt ( int32  Index,
const FScriptSparseSetLayout Layout 
)
inline

◆ RemoveAtUninitialized()

template<typename Allocator >
void TScriptSparseSet< Allocator >::RemoveAtUninitialized ( const FScriptSparseSetLayout Layout,
int32  Index 
)
inline

Member Data Documentation

◆ bHasIntrusiveUnsetOptionalState

template<typename Allocator >
constexpr bool TScriptSparseSet< Allocator >::bHasIntrusiveUnsetOptionalState = true
staticconstexpr

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