muParserX 2.0.0
|
Parser stack implementation. More...
#include <mpStack.h>
Public Member Functions | |
value_type | pop () |
Pop a value from the stack. | |
void | push (const value_type &a_Val) |
Push an object into the stack. | |
unsigned | size () const |
Return the number of stored elements. | |
bool | empty () const |
Returns true if stack is empty false otherwise. | |
value_type & | top () |
Return reference to the top object in the stack. |
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 |
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. |
|
inline |
Push an object into the stack.
a_Val | object to push into the stack. |
nothrow |
|
inline |
Return reference to the top object in the stack.
The top object is the one pushed most recently.