Equalizer 1.0

co::base::Pool< T, locked > Class Template Reference

An object allocation pool. More...

#include <pool.h>

Inheritance diagram for co::base::Pool< T, locked >:
Collaboration diagram for co::base::Pool< T, locked >:

List of all members.

Public Member Functions

 Pool ()
 Construct a new pool.
virtual ~Pool ()
 Destruct this pool.
T * alloc ()
void release (T *item)
 Release an item for reuse.
void flush ()
 Delete all cached items.

Detailed Description

template<typename T, bool locked = false>
class co::base::Pool< T, locked >

An object allocation pool.

Definition at line 31 of file pool.h.


Constructor & Destructor Documentation

template<typename T , bool locked = false>
co::base::Pool< T, locked >::Pool ( ) [inline]

Construct a new pool.

Version:
1.0

Definition at line 35 of file pool.h.

template<typename T , bool locked = false>
virtual co::base::Pool< T, locked >::~Pool ( ) [inline, virtual]

Destruct this pool.

Version:
1.0

Definition at line 38 of file pool.h.

References co::base::Pool< T, locked >::flush().

Here is the call graph for this function:


Member Function Documentation

template<typename T , bool locked = false>
T* co::base::Pool< T, locked >::alloc ( ) [inline]
Returns:
a reusable or new item.
Version:
1.0

Definition at line 41 of file pool.h.

template<typename T , bool locked = false>
void co::base::Pool< T, locked >::flush ( ) [inline]

Delete all cached items.

Version:
1.0

Definition at line 62 of file pool.h.

Referenced by co::base::Pool< T, locked >::~Pool().

Here is the caller graph for this function:

template<typename T , bool locked = false>
void co::base::Pool< T, locked >::release ( T *  item) [inline]

Release an item for reuse.

Version:
1.0

Definition at line 54 of file pool.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3