#include <iso_data_pool.h>
Collaboration diagram for iso::data::Pool< Type >:
Public Member Functions | |
Pool () | |
default constructor | |
Pool (unsigned int pStartPoolSize, unsigned int pPoolSizeIncrement=sPoolSizeIncrement) | |
parameter based constructor | |
Pool (const Type &pProtoElement) | |
proto element based constructor | |
Pool (const Type &pProtoElement, unsigned int pStartPoolSize, unsigned int pPoolSizeIncrement=sPoolSizeIncrement) | |
proto element based constructor | |
virtual | ~Pool () |
destructor | |
Type * | retrieve () |
retrieve object from pool | |
void | release (Type *pObject) |
release object into pool | |
base::String | info () const |
obtain textual event pool information | |
Protected Attributes | |
Type * | mProtoElement |
use proto element to create pool elements | |
QVector< Type * > | mObjects |
vector of unused events | |
unsigned int | mPoolSizeIncrement |
size by which the pool increases whenever it runs out of events | |
Static Protected Attributes | |
static unsigned int | sStartPoolSize |
default initial pool size | |
static unsigned int | sPoolSizeIncrement |
default pool size increment | |
Friends | |
std::ostream & | operator<< (std::ostream &pOstream, const Pool &pPool) |
print pool information |
Created by Daniel Bisig on 7/16/06. Copyright 2006 Daniel Bisig All rights reserved.
iso::data::Pool< Type >::Pool | ( | ) |
default constructor
pool elements will be created via the elements default constructor
iso::data::Pool< Type >::Pool | ( | unsigned int | pStartPoolSize, | |
unsigned int | pPoolSizeIncrement = sPoolSizeIncrement | |||
) |
parameter based constructor
pStartPoolSize | number of events that are initially in the pool | |
pPoolSizeIncrement | size by which the pool increases whenever it runs out of events |
iso::data::Pool< Type >::Pool | ( | const Type & | pProtoElement | ) |
proto element based constructor
pProtoElement | proto element |
iso::data::Pool< Type >::Pool | ( | const Type & | pProtoElement, | |
unsigned int | pStartPoolSize, | |||
unsigned int | pPoolSizeIncrement = sPoolSizeIncrement | |||
) |
proto element based constructor
pProtoElement | proto element | |
pStartPoolSize | number of events that are initially in the pool | |
pPoolSizeIncrement | size by which the pool increases whenever it runs out of events |
iso::data::Pool< Type >::~Pool | ( | ) | [virtual] |
destructor
Type * iso::data::Pool< Type >::retrieve | ( | ) | [inline] |
retrieve object from pool
void iso::data::Pool< Type >::release | ( | Type * | pObject | ) | [inline] |
release object into pool
pObject | object to be released |
base::String iso::data::Pool< Type >::info | ( | ) | const |
obtain textual event pool information
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const Pool< Type > & | pPool | |||
) | [friend] |
print pool information
pOstream | output stream | |
pPool | pool |
unsigned int iso::data::Pool< Type >::sStartPoolSize [static, protected] |
default initial pool size
unsigned int iso::data::Pool< Type >::sPoolSizeIncrement [static, protected] |
default pool size increment
Type* iso::data::Pool< Type >::mProtoElement [protected] |
use proto element to create pool elements
QVector<Type*> iso::data::Pool< Type >::mObjects [protected] |
vector of unused events
unsigned int iso::data::Pool< Type >::mPoolSizeIncrement [protected] |
size by which the pool increases whenever it runs out of events