Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TAlignedHeapAllocator< Alignment >::ForAnyElementType Class Reference

#include <ContainerAllocationPolicies.h>

+ Inheritance diagram for TAlignedHeapAllocator< Alignment >::ForAnyElementType:
+ Collaboration diagram for TAlignedHeapAllocator< Alignment >::ForAnyElementType:

Public Member Functions

 ForAnyElementType ()
 
FORCEINLINE void MoveToEmpty (ForAnyElementType &Other)
 
FORCEINLINE ~ForAnyElementType ()
 
FORCEINLINE FScriptContainerElementGetAllocation () const
 
void ResizeAllocation (int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
 
FORCEINLINE int32 CalculateSlackReserve (int32 NumElements, int32 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

 ForAnyElementType (const ForAnyElementType &)
 
ForAnyElementTypeoperator= (const ForAnyElementType &)
 

Private Attributes

FScriptContainerElementData
 

Detailed Description

template<uint32 Alignment = DEFAULT_ALIGNMENT>
class TAlignedHeapAllocator< Alignment >::ForAnyElementType

Definition at line 212 of file ContainerAllocationPolicies.h.

Constructor & Destructor Documentation

◆ ForAnyElementType() [1/2]

template<uint32 Alignment = DEFAULT_ALIGNMENT>
TAlignedHeapAllocator< Alignment >::ForAnyElementType::ForAnyElementType ( )
inline

Default constructor.

Definition at line 217 of file ContainerAllocationPolicies.h.

◆ ~ForAnyElementType()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE TAlignedHeapAllocator< Alignment >::ForAnyElementType::~ForAnyElementType ( )
inline

Destructor.

Definition at line 240 of file ContainerAllocationPolicies.h.

◆ ForAnyElementType() [2/2]

template<uint32 Alignment = DEFAULT_ALIGNMENT>
TAlignedHeapAllocator< Alignment >::ForAnyElementType::ForAnyElementType ( const ForAnyElementType & )
private

Member Function Documentation

◆ CalculateSlackGrow()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE int32 TAlignedHeapAllocator< Alignment >::ForAnyElementType::CalculateSlackGrow ( int32 NumElements,
int32 NumAllocatedElements,
int32 NumBytesPerElement ) const
inline

Definition at line 274 of file ContainerAllocationPolicies.h.

◆ CalculateSlackReserve()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE int32 TAlignedHeapAllocator< Alignment >::ForAnyElementType::CalculateSlackReserve ( int32 NumElements,
int32 NumBytesPerElement ) const
inline

Definition at line 266 of file ContainerAllocationPolicies.h.

◆ CalculateSlackShrink()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE int32 TAlignedHeapAllocator< Alignment >::ForAnyElementType::CalculateSlackShrink ( int32 NumElements,
int32 NumAllocatedElements,
int32 NumBytesPerElement ) const
inline

Definition at line 270 of file ContainerAllocationPolicies.h.

◆ GetAllocatedSize()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
SIZE_T TAlignedHeapAllocator< Alignment >::ForAnyElementType::GetAllocatedSize ( int32 NumAllocatedElements,
SIZE_T NumBytesPerElement ) const
inline

Definition at line 279 of file ContainerAllocationPolicies.h.

◆ GetAllocation()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE FScriptContainerElement * TAlignedHeapAllocator< Alignment >::ForAnyElementType::GetAllocation ( ) const
inline

Definition at line 249 of file ContainerAllocationPolicies.h.

◆ HasAllocation()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
bool TAlignedHeapAllocator< Alignment >::ForAnyElementType::HasAllocation ( )
inline

Definition at line 284 of file ContainerAllocationPolicies.h.

◆ MoveToEmpty()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FORCEINLINE void TAlignedHeapAllocator< Alignment >::ForAnyElementType::MoveToEmpty ( ForAnyElementType & 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 226 of file ContainerAllocationPolicies.h.

◆ operator=()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
ForAnyElementType & TAlignedHeapAllocator< Alignment >::ForAnyElementType::operator= ( const ForAnyElementType & )
private

◆ ResizeAllocation()

template<uint32 Alignment = DEFAULT_ALIGNMENT>
void TAlignedHeapAllocator< Alignment >::ForAnyElementType::ResizeAllocation ( int32 PreviousNumElements,
int32 NumElements,
SIZE_T NumBytesPerElement )
inline

Definition at line 253 of file ContainerAllocationPolicies.h.

Member Data Documentation

◆ Data

template<uint32 Alignment = DEFAULT_ALIGNMENT>
FScriptContainerElement* TAlignedHeapAllocator< Alignment >::ForAnyElementType::Data
private

A pointer to the container's elements.

Definition at line 294 of file ContainerAllocationPolicies.h.


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