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

#include <ScriptCompactSet.h>

+ Inheritance diagram for TScriptCompactSet< Allocator >:

Public Types

using IntrusiveUnsetOptionalStateType = TScriptCompactSet
 
- Public Types inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
using AllocatorType = Allocator
 
using SizeType = typename AllocatorType::SizeType
 

Public Member Functions

 TScriptCompactSet (FIntrusiveUnsetOptionalState Tag)
 
 TScriptCompactSet ()=default
 
bool IsValidIndex (int32 Index) const
 
int32 NumUnchecked () const
 
voidGetData (int32 Index, const FScriptCompactSetLayout &Layout)
 
const voidGetData (int32 Index, const FScriptCompactSetLayout &Layout) const
 
void MoveAssign (TScriptCompactSet &Other, const FScriptCompactSetLayout &Layout)
 
void Empty (int32 Slack, const FScriptCompactSetLayout &Layout)
 
void RemoveAt (int32 Index, const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< void(void *)> DestructItem)
 
int32 AddUninitialized (const FScriptCompactSetLayout &Layout)
 
void RemoveAtUninitialized (const FScriptCompactSetLayout &Layout, int32 Index)
 
void CommitLastUninitialized (const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
void CommitAllUninitialized (const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
void Rehash (const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash)
 
int32 FindIndex (const void *Element, const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn) const
 
int32 FindIndexByHash (const void *Element, const FScriptCompactSetLayout &Layout, uint32 KeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn) const
 
int32 FindOrAdd (const void *Element, const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn, TFunctionRef< void(void *)> ConstructFn)
 
void Add (const void *Element, const FScriptCompactSetLayout &Layout, TFunctionRef< uint32(const void *)> GetKeyHash, TFunctionRef< bool(const void *, const void *)> EqualityFn, TFunctionRef< void(void *)> ConstructFn, TFunctionRef< void(void *)> DestructFn)
 
 TScriptCompactSet (const TScriptCompactSet &)
 
void operator= (const TScriptCompactSet &)
 
- Public Member Functions inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
bool operator== (FIntrusiveUnsetOptionalState Tag) const
 
UE_FORCEINLINE_HINT bool IsEmpty () const
 
UE_FORCEINLINE_HINT int32 Num () const
 
UE_FORCEINLINE_HINT int32 Max () const
 
UE_FORCEINLINE_HINT int32 GetMaxIndex () const
 
UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize (const FCompactSetLayout Layout) const
 

Static Public Member Functions

static FScriptCompactSetLayout GetScriptLayout (int32 ElementSize, int32 ElementAlignment)
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Additional Inherited Members

- Protected Types inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
using HashCountType = uint32
 
using ElementAllocatorType = typename AllocatorType::template ForElementType< uint8 >
 
- Protected Member Functions inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
UE_FORCEINLINE_HINT TCompactSetBase ()=default
 
consteval TCompactSetBase (EConstEval)
 
 TCompactSetBase (FIntrusiveUnsetOptionalState Tag)
 
UE_FORCEINLINE_HINT const HashCountTypeGetHashTableMemory (const FCompactSetLayout Layout) const
 
FCompactHashTableView GetHashTableView (const FCompactSetLayout Layout)
 
FConstCompactHashTableView GetConstHashTableView (const FCompactSetLayout Layout) const
 
int32 AllocatorCalculateSlackGrow (int32 NewMaxElements, const FCompactSetLayout &Layout) const
 
void ResizeAllocation (const int32 NewMaxElements, const FCompactSetLayout &Layout)
 
bool ResizeAllocationPreserveData (const int32 NewMaxElements, const FCompactSetLayout &Layout, bool bPreserve=true)
 
- Static Protected Member Functions inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
static UE_FORCEINLINE_HINT constexpr SizeType GetHashCount (uint32 NumElements)
 
static UE_FORCEINLINE_HINT constexpr size_t GetElementsSizeInBytes (uint32 NumElements, const FCompactSetLayout Layout)
 
static UE_FORCEINLINE_HINT constexpr size_t GetTotalMemoryRequiredInBytes (uint32 NumElements, uint32 HashCount, const FCompactSetLayout Layout)
 
static UE_FORCEINLINE_HINT constexpr size_t GetTotalMemoryRequiredInBytes (uint32 NumElements, const FCompactSetLayout Layout)
 
static constexpr SizeType GetMaxElementsForAvailableSpace (size_t TotalBytes, uint32 HashCount, uint32 MinElementCount, const FCompactSetLayout Layout)
 
- Protected Attributes inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
ElementAllocatorType Elements
 
SizeType NumElements
 
SizeType MaxElements
 
- Static Protected Attributes inherited from TCompactSetBase< Allocator::template ElementAllocator< sizeof(uint8)> >
static constexpr size_t HashCountSize
 

Member Typedef Documentation

◆ IntrusiveUnsetOptionalStateType

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

Constructor & Destructor Documentation

◆ TScriptCompactSet() [1/3]

◆ TScriptCompactSet() [2/3]

◆ TScriptCompactSet() [3/3]

Member Function Documentation

◆ Add()

template<typename Allocator >
void TScriptCompactSet< Allocator >::Add ( const void Element,
const FScriptCompactSetLayout 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 TScriptCompactSet< Allocator >::AddUninitialized ( const FScriptCompactSetLayout 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 TScriptCompactSet< Allocator >::CommitAllUninitialized ( const FScriptCompactSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash 
)
inline

◆ CommitLastUninitialized()

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

◆ Empty()

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

◆ FindIndex()

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

◆ FindIndexByHash()

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

◆ FindOrAdd()

template<typename Allocator >
int32 TScriptCompactSet< Allocator >::FindOrAdd ( const void Element,
const FScriptCompactSetLayout 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 * TScriptCompactSet< Allocator >::GetData ( int32  Index,
const FScriptCompactSetLayout Layout 
)
inline

◆ GetData() [2/2]

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

◆ GetScriptLayout()

template<typename Allocator >
static FScriptCompactSetLayout TScriptCompactSet< Allocator >::GetScriptLayout ( int32  ElementSize,
int32  ElementAlignment 
)
inlinestatic

◆ IsValidIndex()

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

◆ MoveAssign()

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

◆ NumUnchecked()

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

◆ operator=()

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

◆ Rehash()

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

◆ RemoveAt()

template<typename Allocator >
void TScriptCompactSet< Allocator >::RemoveAt ( int32  Index,
const FScriptCompactSetLayout Layout,
TFunctionRef< uint32(const void *)>  GetKeyHash,
TFunctionRef< void(void *)>  DestructItem 
)
inline

◆ RemoveAtUninitialized()

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

Member Data Documentation

◆ bHasIntrusiveUnsetOptionalState

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

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