iso::data::Pool< Type > Class Template Reference

pool class More...

#include <iso_data_pool.h>

Collaboration diagram for iso::data::Pool< Type >:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

template<typename Type>
class iso::data::Pool< Type >

pool class

Created by Daniel Bisig on 7/16/06. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

template<typename Type>
iso::data::Pool< Type >::Pool (  ) 

default constructor

pool elements will be created via the elements default constructor

template<typename Type>
iso::data::Pool< Type >::Pool ( unsigned int  pStartPoolSize,
unsigned int  pPoolSizeIncrement = sPoolSizeIncrement 
)

parameter based constructor

Parameters:
pStartPoolSize number of events that are initially in the pool
pPoolSizeIncrement size by which the pool increases whenever it runs out of events
pool elements will be created via the elements default constructor

template<typename Type>
iso::data::Pool< Type >::Pool ( const Type &  pProtoElement  ) 

proto element based constructor

Parameters:
pProtoElement proto element
create pool elements based on proto element (copy constructor)

template<typename Type>
iso::data::Pool< Type >::Pool ( const Type &  pProtoElement,
unsigned int  pStartPoolSize,
unsigned int  pPoolSizeIncrement = sPoolSizeIncrement 
)

proto element based constructor

Parameters:
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
create pool elements based on proto element (copy constructor)

template<typename Type>
iso::data::Pool< Type >::~Pool (  )  [virtual]

destructor


Member Function Documentation

template<typename Type>
Type * iso::data::Pool< Type >::retrieve (  )  [inline]

retrieve object from pool

template<typename Type>
void iso::data::Pool< Type >::release ( Type *  pObject  )  [inline]

release object into pool

Parameters:
pObject object to be released

template<typename Type>
base::String iso::data::Pool< Type >::info (  )  const

obtain textual event pool information

Returns:
base::String containing event pool information


Friends And Related Function Documentation

template<typename Type>
std::ostream& operator<< ( std::ostream &  pOstream,
const Pool< Type > &  pPool 
) [friend]

print pool information

Parameters:
pOstream output stream
pPool pool


Member Data Documentation

template<typename Type>
unsigned int iso::data::Pool< Type >::sStartPoolSize [static, protected]

default initial pool size

template<typename Type>
unsigned int iso::data::Pool< Type >::sPoolSizeIncrement [static, protected]

default pool size increment

template<typename Type>
Type* iso::data::Pool< Type >::mProtoElement [protected]

use proto element to create pool elements

template<typename Type>
QVector<Type*> iso::data::Pool< Type >::mObjects [protected]

vector of unused events

template<typename Type>
unsigned int iso::data::Pool< Type >::mPoolSizeIncrement [protected]

size by which the pool increases whenever it runs out of events


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 13:57:33 2011 for iso_data by  doxygen 1.5.1