#include <finitestack.hh>
This class implements a very efficient stack where the maximum depth is known in advance. Note that no error checking is performed!
n | Maximum number of stack entries |
Public Member Functions | |
bool | empty () const |
Returns true if the stack is empty. | |
bool | full () const |
Returns true if the stack is full. | |
void | push (const T &t) |
Puts a new object onto the stack. | |
T | pop () |
Removes and returns the uppermost object from the stack. | |
T | top () const |
Returns the uppermost object on the stack. | |
int | size () const |
Dynamic stacksize. | |
FiniteStack () | |
Makes empty stack. |