Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TFixedAllocator< NumInlineElements >::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]
 

Detailed Description

template<uint32 NumInlineElements>
template<typename ElementType>
class TFixedAllocator< NumInlineElements >::ForElementType< ElementType >

Definition at line 585 of file ContainerAllocationPolicies.h.

Constructor & Destructor Documentation

◆ ForElementType() [1/2]

template<uint32 NumInlineElements>
template<typename ElementType >
TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::ForElementType ( )
inline

Default constructor.

Definition at line 590 of file ContainerAllocationPolicies.h.

◆ ForElementType() [2/2]

template<uint32 NumInlineElements>
template<typename ElementType >
TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::ForElementType ( const ForElementType< ElementType > & )
private

Member Function Documentation

◆ CalculateSlackGrow()

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

Definition at line 631 of file ContainerAllocationPolicies.h.

◆ CalculateSlackReserve()

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

Definition at line 619 of file ContainerAllocationPolicies.h.

◆ CalculateSlackShrink()

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

Definition at line 625 of file ContainerAllocationPolicies.h.

◆ GetAllocatedSize()

template<uint32 NumInlineElements>
template<typename ElementType >
SIZE_T TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::GetAllocatedSize ( int32 NumAllocatedElements,
SIZE_T NumBytesPerElement ) const
inline

Definition at line 638 of file ContainerAllocationPolicies.h.

◆ GetAllocation()

template<uint32 NumInlineElements>
template<typename ElementType >
FORCEINLINE ElementType * TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::GetAllocation ( ) const
inline

Definition at line 608 of file ContainerAllocationPolicies.h.

◆ GetInlineElements()

template<uint32 NumInlineElements>
template<typename ElementType >
ElementType * TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::GetInlineElements ( ) const
inlineprivate
Returns
the base of the aligned inline element data

Definition at line 657 of file ContainerAllocationPolicies.h.

◆ HasAllocation()

template<uint32 NumInlineElements>
template<typename ElementType >
bool TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::HasAllocation ( )
inline

Definition at line 643 of file ContainerAllocationPolicies.h.

◆ MoveToEmpty()

template<uint32 NumInlineElements>
template<typename ElementType >
FORCEINLINE void TFixedAllocator< NumInlineElements >::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 599 of file ContainerAllocationPolicies.h.

◆ operator=()

template<uint32 NumInlineElements>
template<typename ElementType >
ForElementType & TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::operator= ( const ForElementType< ElementType > & )
private

◆ ResizeAllocation()

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

Definition at line 613 of file ContainerAllocationPolicies.h.

Member Data Documentation

◆ InlineData

template<uint32 NumInlineElements>
template<typename ElementType >
TTypeCompatibleBytes<ElementType> TFixedAllocator< NumInlineElements >::ForElementType< ElementType >::InlineData[NumInlineElements]
private

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

Definition at line 654 of file ContainerAllocationPolicies.h.


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