MeshKit
1.0
|
#include <ObjectPool.hpp>
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 |
Definition at line 12 of file ObjectPool.hpp.
ObjectPool | ( | ) | [inline] |
Definition at line 16 of file ObjectPool.hpp.
virtual ~ObjectPool | ( | ) | [inline, virtual] |
Definition at line 20 of file ObjectPool.hpp.
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.
size_t chunkSize [private] |
Definition at line 58 of file ObjectPool.hpp.
Definition at line 88 of file ObjectPool.hpp.