Calculator
Extensible stack-based calculator primarily in library form
|
Base class of all items that can be on the stack. More...
#include <StackItem.h>
Public Types | |
typedef std::shared_ptr< StackItem > | Ptr |
Public Types inherited from Calculator::StackOperator | |
typedef std::shared_ptr< StackOperator > | Ptr |
Public Member Functions | |
virtual | ~StackItem () |
virtual Result | operator() (Stack &stack, StackOperator::Ptr ofThis) |
Execute this item modifying stack. More... | |
virtual std::string | toString () const =0 |
Public Member Functions inherited from Calculator::StackOperator | |
virtual | ~StackOperator () |
Protected Member Functions | |
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 |
Base class of all items that can be on the stack.
Definition at line 28 of file StackItem.h.
typedef std::shared_ptr<StackItem> Calculator::StackItem::Ptr |
Definition at line 30 of file StackItem.h.
|
virtual |
Definition at line 24 of file StackItem.cpp.
|
protecteddefault |
|
protecteddelete |
|
protecteddelete |
|
virtual |
Execute this item modifying stack.
stack | to process on |
ofThis | the StackOperator::Ptr for this object so that its info can be passed around. |
Implements Calculator::StackOperator.
Definition at line 27 of file StackItem.cpp.
|
pure virtual |
Implemented in Calculator::Variable, and Calculator::Number.