UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType Class Reference

#include <ContainerAllocationPolicies.h>

+ Inheritance diagram for TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType:

Public Member Functions

constexpr ForAnyElementType ()
 
consteval ForAnyElementType (EConstEval)
 
template<typename OtherAllocator >
UE_FORCEINLINE_HINT void MoveToEmptyFromOtherAllocator (typename OtherAllocator::ForAnyElementType &Other)
 
UE_FORCEINLINE_HINT void MoveToEmpty (ForAnyElementType &Other)
 
UE_FORCEINLINE_HINT ~ForAnyElementType ()
 
UE_FORCEINLINE_HINT FScriptContainerElementGetAllocation () const
 
void ResizeAllocation (SizeType CurrentNum, SizeType NewMax, SIZE_T NumBytesPerElement)
 
void ResizeAllocation (SizeType CurrentNum, SizeType NewMax, SIZE_T NumBytesPerElement, uint32 AlignmentOfElement)
 
UE_FORCEINLINE_HINT SizeType CalculateSlackReserve (SizeType NewMax, SIZE_T NumBytesPerElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackReserve (SizeType NewMax, SIZE_T NumBytesPerElement, uint32 AlignmentOfElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackShrink (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackShrink (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement, uint32 AlignmentOfElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackGrow (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackGrow (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement, uint32 AlignmentOfElement) const
 
SIZE_T GetAllocatedSize (SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
bool HasAllocation () const
 
constexpr SizeType GetInitialCapacity () const
 

Friends

template<int , typename >
class TSizedHeapAllocator
 

Constructor & Destructor Documentation

◆ ForAnyElementType() [1/2]

template<int IndexSize, typename BaseMallocType = FMemory>
constexpr TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::ForAnyElementType ( )
inlineconstexpr

Default constructor.

◆ ForAnyElementType() [2/2]

template<int IndexSize, typename BaseMallocType = FMemory>
consteval TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::ForAnyElementType ( EConstEval  )
inlineexplicit

Explicitly consteval constructor.

◆ ~ForAnyElementType()

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::~ForAnyElementType ( )
inline

Destructor.

Member Function Documentation

◆ CalculateSlackGrow() [1/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackGrow ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ CalculateSlackGrow() [2/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackGrow ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement,
uint32  AlignmentOfElement 
) const
inline

◆ CalculateSlackReserve() [1/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackReserve ( SizeType  NewMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ CalculateSlackReserve() [2/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackReserve ( SizeType  NewMax,
SIZE_T  NumBytesPerElement,
uint32  AlignmentOfElement 
) const
inline

◆ CalculateSlackShrink() [1/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackShrink ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ CalculateSlackShrink() [2/2]

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::CalculateSlackShrink ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement,
uint32  AlignmentOfElement 
) const
inline

◆ GetAllocatedSize()

template<int IndexSize, typename BaseMallocType = FMemory>
SIZE_T TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::GetAllocatedSize ( SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ GetAllocation()

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT FScriptContainerElement * TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::GetAllocation ( ) const
inline

◆ GetInitialCapacity()

template<int IndexSize, typename BaseMallocType = FMemory>
constexpr SizeType TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::GetInitialCapacity ( ) const
inlineconstexpr

◆ HasAllocation()

template<int IndexSize, typename BaseMallocType = FMemory>
bool TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::HasAllocation ( ) const
inline

◆ MoveToEmpty()

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT void TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::MoveToEmpty ( ForAnyElementType Other)
inline

Moves the state of another allocator into this one. Moves the state of another allocator into this one. The allocator can be different.

Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary).

Parameters
Other- The allocator to move the state from. This allocator should be left in a valid empty state.

◆ MoveToEmptyFromOtherAllocator()

template<int IndexSize, typename BaseMallocType = FMemory>
UE_FORCEINLINE_HINT void TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::MoveToEmptyFromOtherAllocator ( typename OtherAllocator::ForAnyElementType &  Other)
inline

Moves the state of another allocator into this one. The allocator can be different.

Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary).

Parameters
Other- The allocator to move the state from. This allocator should be left in a valid empty state.

◆ ResizeAllocation() [1/2]

template<int IndexSize, typename BaseMallocType = FMemory>
template CORE_API FORCENOINLINE void TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::ResizeAllocation ( SizeType  CurrentNum,
SizeType  NewMax,
SIZE_T  NumBytesPerElement 
)
inline

◆ ResizeAllocation() [2/2]

template<int IndexSize, typename BaseMallocType = FMemory>
template CORE_API FORCENOINLINE void TSizedHeapAllocator< IndexSize, BaseMallocType >::ForAnyElementType::ResizeAllocation ( SizeType  CurrentNum,
SizeType  NewMax,
SIZE_T  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

Friends And Related Symbol Documentation

◆ TSizedHeapAllocator

template<int IndexSize, typename BaseMallocType = FMemory>
template<int , typename >
friend class TSizedHeapAllocator
friend

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