Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TBasicArray< T > Class Template Reference

#include <BasicArray.h>

+ Collaboration diagram for TBasicArray< T >:

Classes

struct  FData
 

Public Member Functions

 TBasicArray ()
 
 TBasicArray (const TBasicArray &)=delete
 
TBasicArrayoperator= (const TBasicArray &)=delete
 
 TBasicArray (TBasicArray &&Other)
 
TBasicArrayoperator= (TBasicArray &&Other)
 
 ~TBasicArray ()
 
template<typename... ArgTypes>
int32 Emplace (ArgTypes &&... Args)
 
template<typename... ArgTypes>
void EmplaceAt (int32 Index, ArgTypes &&... Args)
 
void RemoveAt (int32 Index, int32 NumToRemove=1)
 
bool IsEmpty () const
 
int32 Num () const
 
TGetData ()
 
FORCEINLINE const TGetData () const
 
FORCEINLINE Toperator[] (int32 Index)
 
FORCEINLINE const Toperator[] (int32 Index) const
 

Private Member Functions

voidInsertUninitialized (int32 IndexToAdd)
 

Static Private Member Functions

static FORCEINLINE int32 ApplyGrowthFactor (int32 CurrentNum)
 

Private Attributes

FDataData
 

Static Private Attributes

static constexpr int32 InitialReservationSize = 16
 

Friends

Tbegin (TBasicArray &Arr)
 
const Tbegin (const TBasicArray &Arr)
 
Tend (TBasicArray &Arr)
 
const Tend (const TBasicArray &Arr)
 

Detailed Description

template<typename T>
class TBasicArray< T >

Basic RAII array which can be used without the excessive dependencies needed by TArray, which needs to be serialisable, have a fixed ABI, have lots of helper algorithms as members, have auto-shrinking, support allocators etc.

Definition at line 20 of file BasicArray.h.

Constructor & Destructor Documentation

◆ TBasicArray() [1/3]

template<typename T >
TBasicArray< T >::TBasicArray ( )
inline

Definition at line 23 of file BasicArray.h.

◆ TBasicArray() [2/3]

template<typename T >
TBasicArray< T >::TBasicArray ( const TBasicArray< T > & )
delete

◆ TBasicArray() [3/3]

template<typename T >
TBasicArray< T >::TBasicArray ( TBasicArray< T > && Other)
inline

Definition at line 32 of file BasicArray.h.

◆ ~TBasicArray()

template<typename T >
TBasicArray< T >::~TBasicArray ( )
inline

Definition at line 49 of file BasicArray.h.

Member Function Documentation

◆ ApplyGrowthFactor()

template<typename T >
static FORCEINLINE int32 TBasicArray< T >::ApplyGrowthFactor ( int32 CurrentNum)
inlinestaticprivate

Definition at line 125 of file BasicArray.h.

◆ Emplace()

template<typename T >
template<typename... ArgTypes>
int32 TBasicArray< T >::Emplace ( ArgTypes &&... Args)
inline

Definition at line 59 of file BasicArray.h.

◆ EmplaceAt()

template<typename T >
template<typename... ArgTypes>
void TBasicArray< T >::EmplaceAt ( int32 Index,
ArgTypes &&... Args )
inline

Definition at line 70 of file BasicArray.h.

◆ GetData() [1/2]

template<typename T >
T * TBasicArray< T >::GetData ( )
inline

Definition at line 101 of file BasicArray.h.

◆ GetData() [2/2]

template<typename T >
FORCEINLINE const T * TBasicArray< T >::GetData ( ) const
inline

Definition at line 107 of file BasicArray.h.

◆ InsertUninitialized()

template<typename T >
void * TBasicArray< T >::InsertUninitialized ( int32 IndexToAdd)
inlineprivate

Definition at line 130 of file BasicArray.h.

◆ IsEmpty()

template<typename T >
bool TBasicArray< T >::IsEmpty ( ) const
inline

Definition at line 90 of file BasicArray.h.

◆ Num()

template<typename T >
int32 TBasicArray< T >::Num ( ) const
inline

Definition at line 95 of file BasicArray.h.

◆ operator=() [1/2]

template<typename T >
TBasicArray & TBasicArray< T >::operator= ( const TBasicArray< T > & )
delete

◆ operator=() [2/2]

template<typename T >
TBasicArray & TBasicArray< T >::operator= ( TBasicArray< T > && Other)
inline

Definition at line 38 of file BasicArray.h.

◆ operator[]() [1/2]

template<typename T >
FORCEINLINE T & TBasicArray< T >::operator[] ( int32 Index)
inline

Definition at line 112 of file BasicArray.h.

◆ operator[]() [2/2]

template<typename T >
FORCEINLINE const T & TBasicArray< T >::operator[] ( int32 Index) const
inline

Definition at line 117 of file BasicArray.h.

◆ RemoveAt()

template<typename T >
void TBasicArray< T >::RemoveAt ( int32 Index,
int32 NumToRemove = 1 )
inline

Definition at line 76 of file BasicArray.h.

Friends And Related Symbol Documentation

◆ begin [1/2]

template<typename T >
const T * begin ( const TBasicArray< T > & Arr)
friend

Definition at line 174 of file BasicArray.h.

◆ begin [2/2]

template<typename T >
T * begin ( TBasicArray< T > & Arr)
friend

Definition at line 173 of file BasicArray.h.

◆ end [1/2]

template<typename T >
const T * end ( const TBasicArray< T > & Arr)
friend

Definition at line 176 of file BasicArray.h.

◆ end [2/2]

template<typename T >
T * end ( TBasicArray< T > & Arr)
friend

Definition at line 175 of file BasicArray.h.

Member Data Documentation

◆ Data

template<typename T >
FData* TBasicArray< T >::Data
private

Definition at line 171 of file BasicArray.h.

◆ InitialReservationSize

template<typename T >
constexpr int32 TBasicArray< T >::InitialReservationSize = 16
staticconstexprprivate

Definition at line 123 of file BasicArray.h.


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