#include <sparingStack.h>
Public Methods | |
| SparingStack () | |
| The default constructor. | |
| ~SparingStack () | |
| The destructor. | |
| void | setPool (Pool *pool) |
| Sets the CommonPoolOfBlocks which should be used. | |
| bool | empty () const |
| Returns true iff the stack is empty. | |
| void | push (const value_type &element) |
| Adds an element to the stack. | |
| const value_type & | top () const |
| Returns a reference to the last element. | |
| void | pop () |
| Removes the last element. | |
| int | size () const |
| Returns the number of elements which are stored in the stack. | |
Protected Types | |
|
typedef CommonPoolOfBlocks< value_type, elementsPerBlock, noOfBlocks > | Pool |
| The type of the used CommonPoolOfBlocks. | |
| typedef Pool::Block | Block |
| The type of a Block which stores several elements. | |
Protected Attributes | |
| Pool * | _pool |
| A pointer to the used CommonPoolOfBlocks. | |
| Block * | _top |
| A pointer to the list of blocks which store the elements. | |
| Block | _bottom |
| The bottom block which belongs to the stack. | |
Definition at line 210 of file sparingStack.h.
|
||||||||||
|
Sets the CommonPoolOfBlocks which should be used. This method must be called after the object has been created and before it is used. Definition at line 237 of file sparingStack.h. |
1.2.17