UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType > Class Template Reference

#include <ContainerAllocationPolicies.h>

Public Member Functions

constexpr ForElementType ()
 
consteval ForElementType (EConstEval)
 
UE_FORCEINLINE_HINT void MoveToEmpty (ForElementType &Other)
 
UE_FORCEINLINE_HINT ElementType * GetAllocation () const
 
void ResizeAllocation (SizeType CurrentNum, SizeType NewMax, SIZE_T NumBytesPerElement)
 
UE_FORCEINLINE_HINT SizeType CalculateSlackReserve (SizeType NewMax, SIZE_T NumBytesPerElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackShrink (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
UE_FORCEINLINE_HINT SizeType CalculateSlackGrow (SizeType NewMax, SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
SIZE_T GetAllocatedSize (SizeType CurrentMax, SIZE_T NumBytesPerElement) const
 
bool HasAllocation () const
 
constexpr SizeType GetInitialCapacity () const
 

Constructor & Destructor Documentation

◆ ForElementType() [1/2]

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
constexpr TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::ForElementType ( )
inlineconstexpr

Default constructor.

◆ ForElementType() [2/2]

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
consteval TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::ForElementType ( EConstEval  )
inlineexplicit

Member Function Documentation

◆ CalculateSlackGrow()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
UE_FORCEINLINE_HINT SizeType TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackGrow ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ CalculateSlackReserve()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
UE_FORCEINLINE_HINT SizeType TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackReserve ( SizeType  NewMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ CalculateSlackShrink()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
UE_FORCEINLINE_HINT SizeType TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackShrink ( SizeType  NewMax,
SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ GetAllocatedSize()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
SIZE_T TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::GetAllocatedSize ( SizeType  CurrentMax,
SIZE_T  NumBytesPerElement 
) const
inline

◆ GetAllocation()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
UE_FORCEINLINE_HINT ElementType * TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::GetAllocation ( ) const
inline

◆ GetInitialCapacity()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
constexpr SizeType TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::GetInitialCapacity ( ) const
inlineconstexpr

◆ HasAllocation()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
bool TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::HasAllocation ( ) const
inline

◆ MoveToEmpty()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
UE_FORCEINLINE_HINT void TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::MoveToEmpty ( ForElementType< ElementType > &  Other)
inline

Moves the state of another allocator into this one. 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()

template<uint32 NumInlineElements, int IndexSize, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
void TSizedInlineAllocator< NumInlineElements, IndexSize, SecondaryAllocator >::ForElementType< ElementType >::ResizeAllocation ( SizeType  CurrentNum,
SizeType  NewMax,
SIZE_T  NumBytesPerElement 
)
inline

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