The Original CHomP Software
|
This template contains the definition of a pool of elements that are stored in an extensible table. More...
#include <pool.h>
Public Member Functions | |
pool () | |
The constructor of a pool. More... | |
~pool () | |
The destructor of a pool. More... | |
int | get () |
Allocates a new element in the pool or finds a used one. More... | |
element & | operator[] (int number) |
Retrieves the element in the pool with the given number. More... | |
void | release (int number) |
Marks the given element as unused and available for retrieval the next time the pool is asked for an element. More... | |
Private Member Functions | |
pool (const pool< element > &) | |
The copy constructor is not allowed. More... | |
pool< element > & | operator= (const pool< element > &) |
The assignment operator is not allowed. More... | |
Private Attributes | |
multitable< element > | elem |
The multitable of elements. More... | |
int | elemCount |
The number of elements in the multitable. More... | |
multitable< int > | unused |
The multitable with indices of unused elements. More... | |
int | unusedCount |
The number of unused elements in the multitable. More... | |
This template contains the definition of a pool of elements that are stored in an extensible table.
Elements that are returned to the pool can be reused. Indexing of the elements is done by integer numbers.
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |