#include <stack.hh>
This class can be used instead of the standard STL-stack if detailed knowledge about the stacks implementation is needed. For example, it is unknown if a copy of an empty STL-stack requires time or not
Public Member Functions | |
bool | empty () const |
Returns true if the stack is emptry. | |
bool | full () const |
Always returns false because the stack is never full. | |
void | push (T &t) |
Put a new object onto the stack. | |
T | pop () |
Removes and returns the uppermost object from the stack. | |
T | top () const |
Returns the uppermost object from the stack. | |
int | size () const |
Number of elements on the stack. |