A stack with static memory allocation. More...
#include <dune/common/finitestack.hh>
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. |
A stack with static memory allocation.
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 |
bool Dune::FiniteStack< T, n >::empty | ( | ) | const [inline] |
Returns true if the stack is empty.
Referenced by Dune::FiniteStack< T, n >::pop(), and Dune::FiniteStack< T, n >::top().