Calculator
Step 3
|
#include <node_impl.hpp>
Public Member Functions | |
node_assign (node identifier, node value) | |
node | identifier () const |
node | value () const |
Public Member Functions inherited from node_impl | |
node_impl () | |
virtual | ~node_impl () |
void | print (std::ostream &stream, int indent) const |
double | evaluate () const |
std::string | to_string () const |
Private Member Functions | |
std::string | get_identifier () const |
double | evaluate_value () const |
virtual void | print_node (std::ostream &stream, int indent) const override |
virtual double | evaluate_node () const override |
Private Attributes | |
node | identifier_ |
node | value_ |
Assignment Keep track of an identifier and a value.
Definition at line 81 of file node_impl.hpp.
Definition at line 117 of file node_impl.cpp.
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 152 of file node_impl.cpp.
References evaluate_value(), get_identifier(), and set_variable().
|
private |
Definition at line 139 of file node_impl.cpp.
References node::evaluate(), and value().
Referenced by evaluate_node().
|
private |
Definition at line 133 of file node_impl.cpp.
References identifier(), and node::to_string().
Referenced by evaluate_node(), and print_node().
node node_assign::identifier | ( | ) | const |
Definition at line 121 of file node_impl.cpp.
References identifier_.
Referenced by get_identifier().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 145 of file node_impl.cpp.
References get_identifier(), node::print(), and value().
node node_assign::value | ( | ) | const |
Definition at line 127 of file node_impl.cpp.
References value_.
Referenced by evaluate_value(), and print_node().
|
private |
Definition at line 93 of file node_impl.hpp.
Referenced by identifier().
|
private |
Definition at line 94 of file node_impl.hpp.
Referenced by value().