Calculator
Step 4
|
#include <node_impl.hpp>
Public Member Functions | |
node_function (identifier_list parameters, node definition) | |
identifier_list const & | parameters () const |
node | definition () const |
Public Member Functions inherited from node_impl | |
node_impl () | |
node_impl (node_impl &&)=default | |
node_impl & | operator= (node_impl &&)=default |
virtual | ~node_impl () |
void | print (std::ostream &stream, int indent) const |
double | evaluate () const |
std::string | to_string () const |
identifier_list const & | get_parameters () const |
Private Member Functions | |
virtual void | print_node (std::ostream &stream, int indent) const override |
virtual double | evaluate_node () const override |
virtual identifier_list const & | evaluate_parameters () const override |
Private Attributes | |
identifier_list | parameters_ |
node | definition_ |
Function definition. A function has parameters and a definition.
Definition at line 86 of file node_impl.hpp.
node_function::node_function | ( | identifier_list | parameters, |
node | definition | ||
) |
Definition at line 132 of file node_impl.cpp.
node node_function::definition | ( | ) | const |
Definition at line 142 of file node_impl.cpp.
References definition_.
Referenced by evaluate_node(), and print_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 168 of file node_impl.cpp.
References definition(), and node::evaluate().
|
overrideprivatevirtual |
Reimplemented from node_impl.
Definition at line 174 of file node_impl.cpp.
References parameters().
identifier_list const & node_function::parameters | ( | ) | const |
Definition at line 136 of file node_impl.cpp.
References parameters_.
Referenced by evaluate_parameters(), and print_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 159 of file node_impl.cpp.
References definition(), parameters(), node::print(), and print_identifier_list().
|
private |
Definition at line 97 of file node_impl.hpp.
Referenced by definition().
|
private |
Definition at line 96 of file node_impl.hpp.
Referenced by parameters().