MeshKit  1.0
ObjectPool< T > Class Template Reference

#include <ObjectPool.hpp>

Inheritance diagram for ObjectPool< T >:

List of all members.

Classes

struct  Pool

Public Member Functions

 ObjectPool ()
virtual ~ObjectPool ()
void setChunkSize (size_t n)
void reserve (size_t n)
T * allocate ()
void release (T *obj)
int deleteAll ()

Private Attributes

size_t chunkSize
std::vector< Pool * > vpools

Detailed Description

template<class T>
class ObjectPool< T >

Definition at line 12 of file ObjectPool.hpp.


Constructor & Destructor Documentation

ObjectPool ( ) [inline]

Definition at line 16 of file ObjectPool.hpp.

virtual ~ObjectPool ( ) [inline, virtual]

Definition at line 20 of file ObjectPool.hpp.


Member Function Documentation

T* allocate ( ) [inline]

Definition at line 32 of file ObjectPool.hpp.

int deleteAll ( ) [inline]

Definition at line 49 of file ObjectPool.hpp.

void release ( T *  obj) [inline]

Definition at line 46 of file ObjectPool.hpp.

void reserve ( size_t  n) [inline]

Definition at line 27 of file ObjectPool.hpp.

void setChunkSize ( size_t  n) [inline]

Definition at line 23 of file ObjectPool.hpp.


Member Data Documentation

size_t chunkSize [private]

Definition at line 58 of file ObjectPool.hpp.

std::vector<Pool*> vpools [private]

Definition at line 88 of file ObjectPool.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines