40 void Free(
const TYPE& elem);
111 for (i = 0; i < this->
size; i++)
136#if NEBULA_BOUNDSCHECKS
216 this->
size = newSize;
222 for (i = 0; i < this->
size; i++)
261 for (i = 0; i < this->
size; i++)
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
void operator=(const FixedArray< TYPE > &rhs)
assignment operator
Definition fixedpool.h:123
Util::Array< TYPE > freeValues
Definition fixedpool.h:71
void Free(const TYPE &elem)
free element allocated from pool
Definition fixedpool.h:160
TYPE & operator[](const IndexT elem)
access operator
Definition fixedpool.h:134
FixedPool(SizeT s, std::function< void(TYPE &val, IndexT idx)> setupFunc)
constructor with fixed size
Definition fixedpool.h:103
std::function< void(uint32_t &val, IndexT idx)> setupFunc
Definition fixedpool.h:69
bool IsEmpty() const
returns true if the pool is empty
Definition fixedpool.h:244
const Util::Array< TYPE > & GetAllocated()
get allocated values as array
Definition fixedpool.h:298
Util::Array< TYPE > usedValues
Definition fixedpool.h:72
FixedPool()
default constructor
Definition fixedpool.h:80
~FixedPool()
destructor
Definition fixedpool.h:91
TYPE & Alloc()
allocate an element in the pool
Definition fixedpool.h:147
SizeT NumUsed() const
get number of used elements
Definition fixedpool.h:204
void Clear()
clear all pool values
Definition fixedpool.h:254
SizeT Size() const
get number of elements
Definition fixedpool.h:184
void Free(const Iterator iter)
free element using iterator
Definition fixedpool.h:173
void SetSetupFunc(const std::function< void(TYPE &val, IndexT idx)> &func)
set optional setup value
Definition fixedpool.h:288
void Reset()
resets all used indices without clearing contents
Definition fixedpool.h:273
SizeT size
Definition fixedpool.h:70
void Resize(SizeT newSize)
reset pool and resize pool
Definition fixedpool.h:214
SizeT NumFree() const
get number of free elements
Definition fixedpool.h:194
bool IsFull() const
returns true if no more free values are available
Definition fixedpool.h:234
TYPE * Iterator
define iterator
Definition fixedpool.h:23
#define n_assert(exp)
Definition debug.h:50
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
static const int InvalidIndex
Definition types.h:54
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48