Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TScriptSparseArray< AllocatorType, InDerivedType > Class Template Reference

#include <SparseArray.h>

+ Collaboration diagram for TScriptSparseArray< AllocatorType, InDerivedType >:

Classes

struct  FFreeListLink
 

Public Member Functions

 TScriptSparseArray ()
 
bool IsValidIndex (int32 Index) const
 
bool IsEmpty () const
 
int32 Num () const
 
int32 GetMaxIndex () const
 
voidGetData (int32 Index, const FScriptSparseArrayLayout &Layout)
 
const voidGetData (int32 Index, const FScriptSparseArrayLayout &Layout) const
 
void MoveAssign (DerivedType &Other, const FScriptSparseArrayLayout &Layout)
 
void Empty (int32 Slack, const FScriptSparseArrayLayout &Layout)
 
int32 AddUninitialized (const FScriptSparseArrayLayout &Layout)
 
void RemoveAtUninitialized (const FScriptSparseArrayLayout &Layout, int32 Index, int32 Count=1)
 
 TScriptSparseArray (const TScriptSparseArray &)
 
void operator= (const TScriptSparseArray &)
 

Static Public Member Functions

static FScriptSparseArrayLayout GetScriptLayout (int32 ElementSize, int32 ElementAlignment)
 

Private Types

using DerivedType = typename TChooseClass<std::is_void_v<InDerivedType>, TScriptSparseArray, InDerivedType>::Result
 

Private Member Functions

FORCEINLINE FFreeListLinkGetFreeListLink (int32 Index, const FScriptSparseArrayLayout &Layout)
 

Static Private Member Functions

static void CheckConstraints ()
 

Private Attributes

TScriptArray< typename AllocatorType::ElementAllocator > Data
 
TScriptBitArray< typename AllocatorType::BitArrayAllocator > AllocationFlags
 
int32 FirstFreeIndex
 
int32 NumFreeIndices
 

Detailed Description

template<typename AllocatorType, typename InDerivedType>
class TScriptSparseArray< AllocatorType, InDerivedType >

Definition at line 1268 of file SparseArray.h.

Member Typedef Documentation

◆ DerivedType

template<typename AllocatorType , typename InDerivedType >
using TScriptSparseArray< AllocatorType, InDerivedType >::DerivedType = typename TChooseClass<std::is_void_v<InDerivedType>, TScriptSparseArray, InDerivedType>::Result
private

Definition at line 1270 of file SparseArray.h.

Constructor & Destructor Documentation

◆ TScriptSparseArray() [1/2]

template<typename AllocatorType , typename InDerivedType >
TScriptSparseArray< AllocatorType, InDerivedType >::TScriptSparseArray ( )
inline

Definition at line 1282 of file SparseArray.h.

◆ TScriptSparseArray() [2/2]

template<typename AllocatorType , typename InDerivedType >
TScriptSparseArray< AllocatorType, InDerivedType >::TScriptSparseArray ( const TScriptSparseArray< AllocatorType, InDerivedType > & )
inline

Definition at line 1443 of file SparseArray.h.

Member Function Documentation

◆ AddUninitialized()

template<typename AllocatorType , typename InDerivedType >
int32 TScriptSparseArray< AllocatorType, InDerivedType >::AddUninitialized ( const FScriptSparseArrayLayout & Layout)
inline

Adds an uninitialized object to the array.

Returns
The index of the added element.

Definition at line 1342 of file SparseArray.h.

◆ CheckConstraints()

template<typename AllocatorType , typename InDerivedType >
static void TScriptSparseArray< AllocatorType, InDerivedType >::CheckConstraints ( )
inlinestaticprivate

Definition at line 1399 of file SparseArray.h.

◆ Empty()

template<typename AllocatorType , typename InDerivedType >
void TScriptSparseArray< AllocatorType, InDerivedType >::Empty ( int32 Slack,
const FScriptSparseArrayLayout & Layout )
inline

Definition at line 1328 of file SparseArray.h.

◆ GetData() [1/2]

template<typename AllocatorType , typename InDerivedType >
void * TScriptSparseArray< AllocatorType, InDerivedType >::GetData ( int32 Index,
const FScriptSparseArrayLayout & Layout )
inline

Definition at line 1308 of file SparseArray.h.

◆ GetData() [2/2]

template<typename AllocatorType , typename InDerivedType >
const void * TScriptSparseArray< AllocatorType, InDerivedType >::GetData ( int32 Index,
const FScriptSparseArrayLayout & Layout ) const
inline

Definition at line 1313 of file SparseArray.h.

◆ GetFreeListLink()

template<typename AllocatorType , typename InDerivedType >
FORCEINLINE FFreeListLink * TScriptSparseArray< AllocatorType, InDerivedType >::GetFreeListLink ( int32 Index,
const FScriptSparseArrayLayout & Layout )
inlineprivate

Accessor for the element or free list data.

Definition at line 1435 of file SparseArray.h.

◆ GetMaxIndex()

template<typename AllocatorType , typename InDerivedType >
int32 TScriptSparseArray< AllocatorType, InDerivedType >::GetMaxIndex ( ) const
inline

Definition at line 1303 of file SparseArray.h.

◆ GetScriptLayout()

template<typename AllocatorType , typename InDerivedType >
static FScriptSparseArrayLayout TScriptSparseArray< AllocatorType, InDerivedType >::GetScriptLayout ( int32 ElementSize,
int32 ElementAlignment )
inlinestatic

Definition at line 1273 of file SparseArray.h.

◆ IsEmpty()

template<typename AllocatorType , typename InDerivedType >
bool TScriptSparseArray< AllocatorType, InDerivedType >::IsEmpty ( ) const
inline

Definition at line 1293 of file SparseArray.h.

◆ IsValidIndex()

template<typename AllocatorType , typename InDerivedType >
bool TScriptSparseArray< AllocatorType, InDerivedType >::IsValidIndex ( int32 Index) const
inline

Definition at line 1288 of file SparseArray.h.

◆ MoveAssign()

template<typename AllocatorType , typename InDerivedType >
void TScriptSparseArray< AllocatorType, InDerivedType >::MoveAssign ( DerivedType & Other,
const FScriptSparseArrayLayout & Layout )
inline

Definition at line 1318 of file SparseArray.h.

◆ Num()

template<typename AllocatorType , typename InDerivedType >
int32 TScriptSparseArray< AllocatorType, InDerivedType >::Num ( ) const
inline

Definition at line 1298 of file SparseArray.h.

◆ operator=()

template<typename AllocatorType , typename InDerivedType >
void TScriptSparseArray< AllocatorType, InDerivedType >::operator= ( const TScriptSparseArray< AllocatorType, InDerivedType > & )
inline

Definition at line 1444 of file SparseArray.h.

◆ RemoveAtUninitialized()

template<typename AllocatorType , typename InDerivedType >
void TScriptSparseArray< AllocatorType, InDerivedType >::RemoveAtUninitialized ( const FScriptSparseArrayLayout & Layout,
int32 Index,
int32 Count = 1 )
inline

Removes Count elements from the array, starting from Index, without destructing them.

Definition at line 1369 of file SparseArray.h.

Member Data Documentation

◆ AllocationFlags

template<typename AllocatorType , typename InDerivedType >
TScriptBitArray<typename AllocatorType::BitArrayAllocator> TScriptSparseArray< AllocatorType, InDerivedType >::AllocationFlags
private

Definition at line 1394 of file SparseArray.h.

◆ Data

template<typename AllocatorType , typename InDerivedType >
TScriptArray<typename AllocatorType::ElementAllocator> TScriptSparseArray< AllocatorType, InDerivedType >::Data
private

Definition at line 1393 of file SparseArray.h.

◆ FirstFreeIndex

template<typename AllocatorType , typename InDerivedType >
int32 TScriptSparseArray< AllocatorType, InDerivedType >::FirstFreeIndex
private

Definition at line 1395 of file SparseArray.h.

◆ NumFreeIndices

template<typename AllocatorType , typename InDerivedType >
int32 TScriptSparseArray< AllocatorType, InDerivedType >::NumFreeIndices
private

Definition at line 1396 of file SparseArray.h.


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