Base allocator, designed for good reallocation performance and low RAM footprint. More...

#include <Pool.h>

Inheritance diagram for ConfigDB::PoolData:
Collaboration diagram for ConfigDB::PoolData:

Public Member Functions

 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
 

Protected Member Functions

void * allocate (size_t itemCount)
 
void deallocate (size_t itemCount)
 
void * getItemPtr (unsigned index)
 
const void * getItemPtr (unsigned index) const
 

Protected Attributes

void * buffer {}
 
uint16_t count {0}
 
uint8_t space {0}
 
uint8_t itemSize
 

Detailed Description

Base allocator, designed for good reallocation performance and low RAM footprint.

Constructor & Destructor Documentation

◆ PoolData() [1/3]

ConfigDB::PoolData::PoolData ( size_t  itemSize)
inline

◆ PoolData() [2/3]

ConfigDB::PoolData::PoolData ( const PoolData other)
inline

◆ PoolData() [3/3]

ConfigDB::PoolData::PoolData ( PoolData &&  other)

Member Function Documentation

◆ allocate()

void* ConfigDB::PoolData::allocate ( size_t  itemCount)
protected

◆ clear()

void ConfigDB::PoolData::clear ( void  )
inline

◆ deallocate()

void ConfigDB::PoolData::deallocate ( size_t  itemCount)
protected

◆ ensureCapacity()

bool ConfigDB::PoolData::ensureCapacity ( size_t  capacity)

◆ getCapacity()

size_t ConfigDB::PoolData::getCapacity ( ) const
inline

◆ getCount()

size_t ConfigDB::PoolData::getCount ( ) const
inline

◆ getItemPtr() [1/2]

void* ConfigDB::PoolData::getItemPtr ( unsigned  index)
inlineprotected

◆ getItemPtr() [2/2]

const void* ConfigDB::PoolData::getItemPtr ( unsigned  index) const
inlineprotected

◆ getItemSize() [1/2]

size_t ConfigDB::PoolData::getItemSize ( ) const
inline

◆ getItemSize() [2/2]

size_t ConfigDB::PoolData::getItemSize ( size_t  count) const
inline

◆ operator=()

PoolData& ConfigDB::PoolData::operator= ( const PoolData other)

◆ operator[]() [1/2]

void* ConfigDB::PoolData::operator[] ( unsigned  index)
inline

◆ operator[]() [2/2]

const void* ConfigDB::PoolData::operator[] ( unsigned  index) const
inline

◆ usage()

size_t ConfigDB::PoolData::usage ( ) const
inline

Member Data Documentation

◆ buffer

void* ConfigDB::PoolData::buffer {}
protected

◆ count

uint16_t ConfigDB::PoolData::count {0}
protected

◆ itemSize

uint8_t ConfigDB::PoolData::itemSize
protected

◆ space

uint8_t ConfigDB::PoolData::space {0}
protected

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