#include <StkOpRepository.h>
Public Member Functions | |
StkOpRepository () | |
Constructs a stack operation repository. | |
StkOpRepository (bool ownsFuncs) | |
Constructs a stack operation repository. | |
virtual | ~StkOpRepository () |
Deletes all the created functions and operators. | |
void | add (StkOp *f) |
Adds a stack operation. | |
StkOp * | find (const string &name) const |
Finds the function or operator with the specified name. | |
int | prec (const string &name) const |
Returns the precendence of the operator. | |
int | size () const |
Gets the size of the repository. | |
StkOp * | getFunc (int i) const |
Gets a stack function. | |
tvector< StkOp * > | getVector () const |
Gets a vector containing all stack functions. |
gridripper::math::expr::StkOpRepository::StkOpRepository | ( | bool | ownsFuncs | ) |
Constructs a stack operation repository.
ownsFuncs | set it to true if you expect the repository to delete the functions in its destructor constructor |
void gridripper::math::expr::StkOpRepository::add | ( | StkOp * | f | ) |
Adds a stack operation.
f | the stack operation |
int gridripper::math::expr::StkOpRepository::size | ( | ) | const [inline] |
Gets the size of the repository.
StkOp* gridripper::math::expr::StkOpRepository::getFunc | ( | int | i | ) | const [inline] |
Gets a stack function.
i | the index |
Gets a vector containing all stack functions.