A LIFO stack based on a singly-linked list. Operations are push(), pop(), top(), bottom() and empty(). More...
#include <OpenFOAM/LIFOStack.H>
A LIFO stack based on a singly-linked list. Operations are push(), pop(), top(), bottom() and empty().
Definition at line 51 of file LIFOStack.H.
Public Member Functions | |
LIFOStack () | |
Construct null.
| |
LIFOStack (T a) | |
Construct given initial T.
| |
LIFOStack (Istream &is) | |
Construct from Istream.
| |
T | top () const |
Return a copy of the top element.
| |
T | bottom () const |
Return a copy of the bottom element.
| |
void | push (const T &a) |
Push an element onto the stack.
| |
T | pop () |
Pop the top element off the stack.
|
LIFOStack | ( | ) | [inline]
|
Construct null.
Definition at line 61 of file LIFOStack.H.
LIFOStack | ( | T | a ) | [inline]
|
Construct given initial T.
Definition at line 65 of file LIFOStack.H.
Construct from Istream.
Definition at line 71 of file LIFOStack.H.
T top | ( | ) | const [inline]
|
Return a copy of the top element.
Definition at line 82 of file LIFOStack.H.
References LList< SLListBase, T >::first().
T bottom | ( | ) | const [inline]
|
Return a copy of the bottom element.
Definition at line 88 of file LIFOStack.H.
References LList< SLListBase, T >::last().
void push | ( | const T & | a ) | [inline]
|
Push an element onto the stack.
Definition at line 97 of file LIFOStack.H.
References LList< SLListBase, T >::insert().
T pop | ( | ) | [inline]
|
Pop the top element off the stack.
Definition at line 103 of file LIFOStack.H.
References LList< SLListBase, T >::removeHead().