MADNESS
version 0.9
|
Parser stack implementation. More...
#include <muParserStack.h>
Public Member Functions | |
ParserStack () | |
virtual | ~ParserStack () |
TValueType | pop () |
Pop a value from the stack. More... | |
void | push (const TValueType &a_Val) |
Push an object into the stack. More... | |
unsigned | size () const |
Return the number of stored elements. More... | |
bool | empty () const |
Returns true if stack is empty false otherwise. More... | |
TValueType & | top () |
Return reference to the top object in the stack. More... | |
Parser stack implementation.
Stack implementation based on a std::stack. The behaviour of pop() had been slightly changed in order to get an error code if the stack is empty. The stack is used within the Parser both as a value stack and as an operator stack.
|
inline |
|
inlinevirtual |
|
inline |
Returns true if stack is empty false otherwise.
Referenced by mu::ParserStack< TValueType >::pop().
|
inline |
Pop a value from the stack.
Unlike the standard implementation this function will return the value that is going to be taken from the stack.
ParserException | in case the stack is empty. |
References _T, mu::ParserStack< TValueType >::empty(), and mu::ParserStack< TValueType >::top().
|
inline |
Push an object into the stack.
a_Val | object to push into the stack. |
nothrow |
|
inline |
Return the number of stored elements.
|
inline |
Return reference to the top object in the stack.
The top object is the one pushed most recently.
Referenced by mu::ParserStack< TValueType >::pop().