ConfigDB::ArrayData Class Reference

An array of fixed-sized items. More...

#include <Pool.h>

Inheritance diagram for ConfigDB::ArrayData:
Collaboration diagram for ConfigDB::ArrayData:

Public Member Functions

void * insert (unsigned index, const void *data=nullptr, size_t itemCount=1)
 
void * add (const void *data=nullptr, size_t itemCount=1)
 
bool remove (unsigned index)
 
void dispose ()
 Clear and mark this array as 'not in use' so it can be re-used. More...
 
 PoolData (size_t itemSize)
 
 PoolData (const PoolData &other)
 
 PoolData (PoolData &&other)
 
- Public Member Functions inherited from ConfigDB::PoolData
 PoolData (size_t itemSize)
 
 PoolData (const PoolData &other)
 
 PoolData (PoolData &&other)
 
PoolDataoperator= (const PoolData &other)
 
size_t getCount () const
 
size_t getCapacity () const
 
size_t getItemSize () const
 
size_t getItemSize (size_t count) const
 
void * operator[] (unsigned index)
 
const void * operator[] (unsigned index) const
 
void clear ()
 
bool ensureCapacity (size_t capacity)
 
size_t usage () const
 

Additional Inherited Members

- Protected Member Functions inherited from ConfigDB::PoolData
void * allocate (size_t itemCount)
 
void deallocate (size_t itemCount)
 
void * getItemPtr (unsigned index)
 
const void * getItemPtr (unsigned index) const
 
- Protected Attributes inherited from ConfigDB::PoolData
void * buffer {}
 
uint16_t count {0}
 
uint8_t space {0}
 
uint8_t itemSize
 

Detailed Description

An array of fixed-sized items.

The ArrayPool class manages these instances. This isn't type-based but rather uses an item size, so it's difficult to implement with the STL.

Member Function Documentation

◆ add()

void* ConfigDB::ArrayData::add ( const void *  data = nullptr,
size_t  itemCount = 1 
)
inline

◆ dispose()

void ConfigDB::ArrayData::dispose ( )
inline

Clear and mark this array as 'not in use' so it can be re-used.

◆ insert()

void* ConfigDB::ArrayData::insert ( unsigned  index,
const void *  data = nullptr,
size_t  itemCount = 1 
)

◆ PoolData() [1/3]

ConfigDB::PoolData::PoolData
inline

◆ PoolData() [2/3]

ConfigDB::PoolData::PoolData

◆ PoolData() [3/3]

ConfigDB::PoolData::PoolData
inline

◆ remove()

bool ConfigDB::ArrayData::remove ( unsigned  index)

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