Calculator
Extensible stack-based calculator primarily in library form
|
StackItem representing a number. More...
#include <Number.h>
Public Types | |
typedef std::shared_ptr< Number > | 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 | ~Number () |
float | getValue () 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 Number::Ptr | create (float theValue) |
Create with theValue to represent. More... | |
Protected Member Functions | |
Number (float theValue) | |
Create with theValue to represent. More... | |
Number ()=delete | |
Number (const Number &)=delete | |
Number (Number &&)=delete | |
Number & | operator= (const Number &)=delete |
Number & | operator= (Number &&)=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 number.
These are not re-used and the current value is not modified after creation.
typedef std::shared_ptr<Number> Calculator::Number::Ptr |
|
virtual |
Definition at line 38 of file Number.cpp.
|
protected |
Create with theValue to represent.
theValue | to be stored in this |
Definition at line 41 of file Number.cpp.
|
protecteddelete |
|
protecteddelete |
|
protecteddelete |
|
static |
Create with theValue to represent.
theValue | to be stored in this |
Definition at line 34 of file Number.cpp.
float Calculator::Number::getValue | ( | ) | const |
Definition at line 46 of file Number.cpp.
|
inlinestatic |
|
virtual |
Implements Calculator::StackItem.
Definition at line 50 of file Number.cpp.