ObjectPool< T > Class Template Reference

#include <ObjectPool.h>

Inheritance diagram for ObjectPool< T >:

Inheritance graph
[legend]

List of all members.

Public Types

typedef T Object

Public Member Functions

 ObjectPool (std::string name_="T", size_t N_=100000, int m=cleanUpOnDestruction)
Objectget ()
Objectget (const Object &x)
ObjectgetPtr ()
void freeObject (Object *x)
template<class fwiter >
void freeObjects (fwiter b, fwiter e)
void reset ()
void cleanUp ()
 ~ObjectPool ()
void printInfo (std::ostream &out) const

Static Public Attributes

static const int cleanUpOnDestruction = 1
static const int hasTrivialDestructor = 2


Detailed Description

template<typename T>
class ObjectPool< T >

Definition at line 25 of file ObjectPool.h.


Member Typedef Documentation

template<typename T>
typedef T ObjectPool< T >::Object

Definition at line 28 of file ObjectPool.h.


Constructor & Destructor Documentation

template<typename T>
ObjectPool< T >::ObjectPool ( std::string  name_ = "T",
size_t  N_ = 100000,
int  m = cleanUpOnDestruction 
) [inline]

Definition at line 48 of file ObjectPool.h.

template<typename T>
ObjectPool< T >::~ObjectPool (  )  [inline]

Definition at line 105 of file ObjectPool.h.


Member Function Documentation

template<typename T>
void ObjectPool< T >::cleanUp (  )  [inline]

Definition at line 98 of file ObjectPool.h.

Referenced by ObjectPool< PPimp >::~ObjectPool().

Here is the caller graph for this function:

template<typename T>
void ObjectPool< T >::freeObject ( Object x  )  [inline]

Definition at line 83 of file ObjectPool.h.

template<typename T>
template<class fwiter >
void ObjectPool< T >::freeObjects ( fwiter  b,
fwiter  e 
) [inline]

Definition at line 86 of file ObjectPool.h.

template<typename T>
Object* ObjectPool< T >::get ( const Object x  )  [inline]

Definition at line 58 of file ObjectPool.h.

template<typename T>
Object* ObjectPool< T >::get (  )  [inline]

Definition at line 55 of file ObjectPool.h.

Referenced by Moses::PrefixTreeMap::Extend(), and Moses::PrefixTreeMap::GetRoot().

Here is the caller graph for this function:

template<typename T>
Object* ObjectPool< T >::getPtr (  )  [inline]

Definition at line 65 of file ObjectPool.h.

Referenced by ObjectPool< PPimp >::get().

Here is the caller graph for this function:

template<typename T>
void ObjectPool< T >::printInfo ( std::ostream &  out  )  const [inline]

Definition at line 109 of file ObjectPool.h.

template<typename T>
void ObjectPool< T >::reset (  )  [inline]

Definition at line 91 of file ObjectPool.h.

Referenced by ObjectPool< PPimp >::cleanUp(), and Moses::PrefixTreeMap::FreeMemory().

Here is the caller graph for this function:


Member Data Documentation

template<typename T>
const int ObjectPool< T >::cleanUpOnDestruction = 1 [static]

Definition at line 37 of file ObjectPool.h.

Referenced by ObjectPool< PPimp >::~ObjectPool().

template<typename T>
const int ObjectPool< T >::hasTrivialDestructor = 2 [static]

Definition at line 38 of file ObjectPool.h.


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

Generated on Thu Jul 6 00:31:56 2017 for Moses by  doxygen 1.5.9