Calculator
Step 6
|
#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 () |
node_impl (node_impl &&)=default | |
node_impl & | operator= (node_impl &&)=default |
void | print (std::ostream &stream, int indent) const |
number | 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 number | 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 101 of file node_impl.hpp.
node_function::node_function | ( | identifier_list | parameters, |
node | definition | ||
) |
Definition at line 202 of file node_impl.cpp.
node_function::node_function | ( | std::istream & | stream | ) |
Definition at line 206 of file node_impl.cpp.
node node_function::definition | ( | ) | const |
Definition at line 228 of file node_impl.cpp.
References definition_.
Referenced by evaluate_node(), print_node(), and save_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 254 of file node_impl.cpp.
References definition(), and node::evaluate().
|
overrideprivatevirtual |
Reimplemented from node_impl.
Definition at line 260 of file node_impl.cpp.
References parameters().
identifier_list const & node_function::parameters | ( | ) | const |
Definition at line 222 of file node_impl.cpp.
References parameters_.
Referenced by evaluate_parameters(), print_node(), and save_node().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 245 of file node_impl.cpp.
References definition(), parameters(), node::print(), and print_identifier_list().
|
overrideprivatevirtual |
Implements node_impl.
Definition at line 266 of file node_impl.cpp.
References definition(), parameters(), and node::save().
|
private |
Definition at line 114 of file node_impl.hpp.
Referenced by definition().
|
private |
Definition at line 113 of file node_impl.hpp.
Referenced by parameters().