Calculator
Step 5
|
#include <node_impl.hpp>
Public Member Functions | |
node_function (identifier_list parameters, node definition) | |
node_function (std::istream &stream) | |
identifier_list const & | parameters () const |
node | definition () 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 |
identifier_list const & | get_parameters () const |
void | save (std::ostream &stream) 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 |
virtual void | save_node (std::ostream &stream) const override |
Private Attributes | |
identifier_list | parameters_ |
node | definition_ |
Additional Inherited Members | |
Static Public Member Functions inherited from node_impl | |
static std::shared_ptr< node_impl > | read_node (std::istream &stream) |
Function definition. A function has parameters and a definition.
Definition at line 98 of file node_impl.hpp.
node_function::node_function | ( | identifier_list | parameters, |
node | definition | ||
) |
Definition at line 203 of file node_impl.cpp.
node_function::node_function | ( | std::istream & | stream | ) |
Definition at line 207 of file node_impl.cpp.
node node_function::definition | ( | ) | const |
Definition at line 229 of file node_impl.cpp.
References definition_.
Referenced by evaluate_node(), print_node(), and save_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 255 of file node_impl.cpp.
References definition(), and node::evaluate().
|
overrideprivatevirtual |
Reimplemented from node_impl.
Definition at line 261 of file node_impl.cpp.
References parameters().
identifier_list const & node_function::parameters | ( | ) | const |
Definition at line 223 of file node_impl.cpp.
References parameters_.
Referenced by evaluate_parameters(), print_node(), and save_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 246 of file node_impl.cpp.
References definition(), parameters(), node::print(), and print_identifier_list().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 267 of file node_impl.cpp.
References definition(), parameters(), and node::save().
|
private |
Definition at line 111 of file node_impl.hpp.
Referenced by definition().
|
private |
Definition at line 110 of file node_impl.hpp.
Referenced by parameters().