Calculator
Extensible stack-based calculator primarily in library form
|
Base class for all operators. More...
#include <StackOperator.h>
Public Types | |
typedef std::shared_ptr< StackOperator > | Ptr |
Public Member Functions | |
virtual | ~StackOperator () |
virtual Result | operator() (Stack &stack, StackOperator::Ptr ofThis)=0 |
Execute this operator on stack. More... | |
Protected Member Functions | |
StackOperator ()=default | |
StackOperator (const StackOperator &)=delete | |
StackOperator (StackOperator &&)=delete | |
StackOperator & | operator= (const StackOperator &)=delete |
StackOperator & | operator= (StackOperator &&)=delete |
Base class for all operators.
StackOperatorCreators and the StackFactory will return StackOperator::Ptr.
Definition at line 29 of file StackOperator.h.
typedef std::shared_ptr<StackOperator> Calculator::StackOperator::Ptr |
Definition at line 31 of file StackOperator.h.
|
inlinevirtual |
Definition at line 33 of file StackOperator.h.
|
protecteddefault |
|
protecteddelete |
|
protecteddelete |
|
pure virtual |
Execute this operator on stack.
stack | to operate on |
ofThis | is this in a copied StackOperator::Ptr to maintain integrity of the shared_ptrs. |
Implemented in Calculator::VariableManipulator, Calculator::StackManipulator, Calculator::StackItem, and Calculator::BinaryMathOperator.
|
protecteddelete |
|
protecteddelete |