|
Calculator
Extensible stack-based calculator primarily in library form
|
StackItem representing a variable. More...
#include <Variable.h>


Public Types | |
| typedef std::shared_ptr< Variable > | Ptr |
Public Types inherited from Calculator::StackItem | |
| typedef std::shared_ptr< StackItem > | Ptr |
Public Types inherited from Calculator::StackOperator | |
| typedef std::shared_ptr< StackOperator > | Ptr |
Public Member Functions | |
| virtual | ~Variable () |
| const std::string & | getName () const |
| virtual std::string | toString () const |
Public Member Functions inherited from Calculator::StackItem | |
| virtual | ~StackItem () |
| virtual Result | operator() (Stack &stack, StackOperator::Ptr ofThis) |
| Execute this item modifying stack. More... | |
Public Member Functions inherited from Calculator::StackOperator | |
| virtual | ~StackOperator () |
Static Public Member Functions | |
| static const std::string | indef_type_string () |
| static Variable::Ptr | create (const std::string &theName) |
| Create with theName to represent. More... | |
Protected Member Functions | |
| Variable (const std::string &theName) | |
| Create with theName to represent. More... | |
| Variable ()=delete | |
| Variable (const Variable &)=delete | |
| Variable (Variable &&)=delete | |
| Variable & | operator= (const Variable &)=delete |
| Variable & | operator= (Variable &&)=delete |
Protected Member Functions inherited from Calculator::StackItem | |
| StackItem ()=default | |
| StackItem (const StackItem &)=delete | |
| StackItem (StackItem &&)=delete | |
| StackItem & | operator= (const StackItem &)=delete |
| StackItem & | operator= (StackItem &&)=delete |
Protected Member Functions inherited from Calculator::StackOperator | |
| StackOperator ()=default | |
| StackOperator (const StackOperator &)=delete | |
| StackOperator (StackOperator &&)=delete | |
| StackOperator & | operator= (const StackOperator &)=delete |
| StackOperator & | operator= (StackOperator &&)=delete |
StackItem representing a variable.
These are not re-used and the current value is not modified after creation.
Definition at line 29 of file Variable.h.
| typedef std::shared_ptr<Variable> Calculator::Variable::Ptr |
Definition at line 31 of file Variable.h.
|
virtual |
Definition at line 28 of file Variable.cpp.
|
protected |
Create with theName to represent.
| theName | to be stored in this |
Definition at line 31 of file Variable.cpp.
|
protecteddelete |
|
protecteddelete |
|
protecteddelete |
|
static |
Create with theName to represent.
| theName | to be stored in this |
Definition at line 24 of file Variable.cpp.
| const std::string & Calculator::Variable::getName | ( | ) | const |
Definition at line 36 of file Variable.cpp.
|
inlinestatic |
Definition at line 33 of file Variable.h.
|
virtual |
Implements Calculator::StackItem.
Definition at line 40 of file Variable.cpp.