template<class TYPE>
class Util::FixedPool< TYPE >
Implements a fixed size pool, from which objects of a specific type can be allocated and freed for reuse.
- Copyright
- (C) 2013-2020 Individual contributors, see AUTHORS file
|
| | FixedPool () |
| | default constructor
|
| | FixedPool (SizeT s, std::function< void(TYPE &val, IndexT idx)> setupFunc) |
| | constructor with fixed size
|
| | ~FixedPool () |
| | destructor
|
| void | operator= (const FixedArray< TYPE > &rhs) |
| | assignment operator
|
| TYPE & | operator[] (const IndexT elem) |
| | access operator
|
| TYPE & | Alloc () |
| | allocate an element in the pool
|
| void | Free (const TYPE &elem) |
| | free element allocated from pool
|
| void | Free (const Iterator iter) |
| | free element using iterator
|
| SizeT | Size () const |
| | get number of elements
|
| SizeT | NumFree () const |
| | get number of free elements
|
| SizeT | NumUsed () const |
| | get number of used elements
|
| void | Resize (SizeT newSize) |
| | reset pool and resize pool
|
| bool | IsFull () const |
| | returns true if no more free values are available
|
| bool | IsEmpty () const |
| | returns true if the pool is empty
|
| void | Clear () |
| | clear all pool values
|
| void | Reset () |
| | resets all used indices without clearing contents
|
| void | SetSetupFunc (const std::function< void(TYPE &val, IndexT idx)> &func) |
| | set optional setup value
|
| const Util::Array< TYPE > & | GetAllocated () |
| | get allocated values as array
|