|
Calculator
Extensible stack-based calculator primarily in library form
|
Drivable class to run the calculator with a variable factory per process call to support changing command sets. More...
#include <Executive.h>
Public Member Functions | |
| Executive (Stack &stack) | |
| Create with the stack to process. More... | |
| Executive (const Executive &)=delete | |
| Executive (Executive &&)=delete | |
| Executive & | operator= (const Executive &)=delete |
| Executive & | operator= (Executive &&)=delete |
| std::string | toString () const |
| void | process (StackOperatorFactory &factory, std::istream &input, std::ostream &output) |
| Process commands from input and pushing generated info to output. More... | |
| Result | process (StackOperatorFactory &factory, const std::string &input) |
| Process commands from input and pushing generated info to output. More... | |
| Result | process (StackOperator::Ptr oper) |
| Process oper upon the Stack. More... | |
| unsigned int | getOperationCount () const |
| void | doHelp (const StackOperatorFactory &factory, std::ostream &output) const |
| Generate help info for this executive to output. More... | |
Drivable class to run the calculator with a variable factory per process call to support changing command sets.
Definition at line 30 of file Executive.h.
| Calculator::Executive::Executive | ( | Stack & | stack | ) |
Create with the stack to process.
| stack | to process |
Definition at line 28 of file Executive.cpp.
|
delete |
|
delete |
| void Calculator::Executive::doHelp | ( | const StackOperatorFactory & | factory, |
| std::ostream & | output | ||
| ) | const |
Generate help info for this executive to output.
| factory | providing commands to get help from |
| output | to write help info to |
Definition at line 93 of file Executive.cpp.
| unsigned int Calculator::Executive::getOperationCount | ( | ) | const |
Definition at line 89 of file Executive.cpp.
| Result Calculator::Executive::process | ( | StackOperator::Ptr | oper | ) |
Process oper upon the Stack.
| oper | to process on the Stack |
Definition at line 77 of file Executive.cpp.
| Result Calculator::Executive::process | ( | StackOperatorFactory & | factory, |
| const std::string & | input | ||
| ) |
Process commands from input and pushing generated info to output.
| factory | to parse input and generate Operators from |
| input | to create one operator and execute from |
Definition at line 57 of file Executive.cpp.
| void Calculator::Executive::process | ( | StackOperatorFactory & | factory, |
| std::istream & | input, | ||
| std::ostream & | output | ||
| ) |
Process commands from input and pushing generated info to output.
| factory | to parse input and generate Operators from |
| input | to read commands from |
| output | to write status to |
Definition at line 33 of file Executive.cpp.
| std::string Calculator::Executive::toString | ( | ) | const |
Definition at line 53 of file Executive.cpp.