Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType > Class Template Reference

#include <ContainerAllocationPolicies.h>

Public Member Functions

 ForElementType ()
 
FORCEINLINE void MoveToEmpty (ForElementType &Other)
 
FORCEINLINE ElementType * GetAllocation () const
 
void ResizeAllocation (int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
 
FORCEINLINE int32 CalculateSlackReserve (int32 NumElements, SIZE_T NumBytesPerElement) const
 
FORCEINLINE int32 CalculateSlackShrink (int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
 
FORCEINLINE int32 CalculateSlackGrow (int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
 
SIZE_T GetAllocatedSize (int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
 
bool HasAllocation ()
 

Private Member Functions

 ForElementType (const ForElementType &)
 
ForElementTypeoperator= (const ForElementType &)
 
ElementType * GetInlineElements () const
 

Private Attributes

TTypeCompatibleBytes< ElementType > InlineData [NumInlineElements]
 
SecondaryAllocator::template ForElementType< ElementType > SecondaryData
 

Detailed Description

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType>
class TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >

Definition at line 447 of file ContainerAllocationPolicies.h.

Constructor & Destructor Documentation

◆ ForElementType() [1/2]

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::ForElementType ( )
inline

Default constructor.

Definition at line 452 of file ContainerAllocationPolicies.h.

◆ ForElementType() [2/2]

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::ForElementType ( const ForElementType< ElementType > & )
private

Member Function Documentation

◆ CalculateSlackGrow()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
FORCEINLINE int32 TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackGrow ( int32 NumElements,
int32 NumAllocatedElements,
int32 NumBytesPerElement ) const
inline

Definition at line 528 of file ContainerAllocationPolicies.h.

+ Here is the caller graph for this function:

◆ CalculateSlackReserve()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
FORCEINLINE int32 TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackReserve ( int32 NumElements,
SIZE_T NumBytesPerElement ) const
inline

Definition at line 514 of file ContainerAllocationPolicies.h.

+ Here is the caller graph for this function:

◆ CalculateSlackShrink()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
FORCEINLINE int32 TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::CalculateSlackShrink ( int32 NumElements,
int32 NumAllocatedElements,
int32 NumBytesPerElement ) const
inline

Definition at line 521 of file ContainerAllocationPolicies.h.

◆ GetAllocatedSize()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
SIZE_T TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::GetAllocatedSize ( int32 NumAllocatedElements,
SIZE_T NumBytesPerElement ) const
inline

Definition at line 536 of file ContainerAllocationPolicies.h.

◆ GetAllocation()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
FORCEINLINE ElementType * TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::GetAllocation ( ) const
inline

Definition at line 477 of file ContainerAllocationPolicies.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInlineElements()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
ElementType * TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::GetInlineElements ( ) const
inlineprivate
Returns
the base of the aligned inline element data

Definition at line 557 of file ContainerAllocationPolicies.h.

+ Here is the caller graph for this function:

◆ HasAllocation()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
bool TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::HasAllocation ( )
inline

Definition at line 541 of file ContainerAllocationPolicies.h.

◆ MoveToEmpty()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
FORCEINLINE void TInlineAllocator< NumInlineElements, 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.

Definition at line 461 of file ContainerAllocationPolicies.h.

+ Here is the caller graph for this function:

◆ operator=()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
ForElementType & TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::operator= ( const ForElementType< ElementType > & )
private

◆ ResizeAllocation()

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
void TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::ResizeAllocation ( int32 PreviousNumElements,
int32 NumElements,
SIZE_T NumBytesPerElement )
inline

Definition at line 482 of file ContainerAllocationPolicies.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ InlineData

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
TTypeCompatibleBytes<ElementType> TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::InlineData[NumInlineElements]
private

The data is stored in this array if less than NumInlineElements is needed.

Definition at line 551 of file ContainerAllocationPolicies.h.

◆ SecondaryData

template<uint32 NumInlineElements, typename SecondaryAllocator = FDefaultAllocator>
template<typename ElementType >
SecondaryAllocator::template ForElementType<ElementType> TInlineAllocator< NumInlineElements, SecondaryAllocator >::ForElementType< ElementType >::SecondaryData
private

The data is allocated through the indirect allocation policy if more than NumInlineElements is needed.

Definition at line 554 of file ContainerAllocationPolicies.h.


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