Holds arbitrary type items by value. The good things about it:
| T | Type of the items. |
Public Methods | |
| CFixedPool (int space) | |
| Constructor. | |
| ~CFixedPool () | |
| Destructor. | |
| int | size () const |
| Returns current item count. | |
| int | capacity () const |
| Returns total capacity. | |
| bool | empty () const |
| Returns whether the pool is empty. | |
| bool | hasSpace () const |
| Returns whether the pool is not full. | |
| T & | add (const T &value=T()) |
| Adds item to pool. | |
| void | clear () |
| Clears the pool. | |
| iterator | erase (iterator it) |
| Erases a single item. | |
| iterator | begin () |
| Returns iterator to the first item. | |
| const_iterator | begin () const |
| Returns const iterator to the first item. | |
| iterator | end () |
| Returns iterator to the item "beyond the last". | |
| const_iterator | end () const |
| Returns const iterator to the item "beyond the last". | |
|
||||||||||
|
Constructor.
|
|
||||||||||
|
Adds item to pool. Copies the given item to the pool, and returns a reference to a copy. You should use the returned reference to point to an item in the pool (not the given one!).
|
|
||||||||||
|
Erases a single item.
|
1.2.17