![]() |
Public API Reference |
![]() |
This is an object pool which holds objects of type csPoly2D. More...
#include <csgeom/polypool.h>
Public Member Functions | |
csPoly2D * | Alloc () |
Allocate a new object in the pool. | |
csPoly2DPool (csPoly2DFactory *fact) | |
Create an empty pool. | |
void | Free (csPoly2D *pol) |
Free an object and put it back in the pool. | |
~csPoly2DPool () | |
Destroy pool and all objects in the pool. |
This is an object pool which holds objects of type csPoly2D.
You can ask new instances from this pool. If needed it will allocate one for you but ideally it can give you one which was allocated earlier.
Definition at line 39 of file polypool.h.
csPoly2DPool::csPoly2DPool | ( | csPoly2DFactory * | fact | ) | [inline] |
Create an empty pool.
Definition at line 57 of file polypool.h.
csPoly2DPool::~csPoly2DPool | ( | ) | [inline] |
Destroy pool and all objects in the pool.
Definition at line 61 of file polypool.h.
csPoly2D* csPoly2DPool::Alloc | ( | ) | [inline] |
Allocate a new object in the pool.
Definition at line 83 of file polypool.h.
void csPoly2DPool::Free | ( | csPoly2D * | pol | ) | [inline] |
Free an object and put it back in the pool.
Note that it is only legal to free objects which were allocated from the pool.
Definition at line 106 of file polypool.h.