#include <node_impl.hpp>
Public Member Functions | |
node_function (identifier_list const ¶meters, node definition) | |
identifier_list const & | parameters () const |
node | definition () const |
Private Member Functions | |
virtual void | print_node (std::ostream &stream, int indent) const |
virtual double | evaluate_node () const |
virtual identifier_list const & | evaluate_parameters () const |
Private Attributes | |
identifier_list | parameters_ |
node | definition_ |
Definition at line 91 of file node_impl.hpp.
node_function::node_function | ( | identifier_list const & | parameters, | |
node | definition | |||
) |
Definition at line 144 of file node_impl.cpp.
00145 : node_impl(), parameters_(parameters), definition_(definition) 00146 {}
identifier_list const & node_function::parameters | ( | ) | const |
Definition at line 148 of file node_impl.cpp.
References parameters_.
Referenced by evaluate_parameters(), and print_node().
00150 { 00151 return parameters_; 00152 }
node node_function::definition | ( | ) | const |
Definition at line 154 of file node_impl.cpp.
References definition_.
Referenced by evaluate_node(), and print_node().
00156 { 00157 return definition_; 00158 }
void node_function::print_node | ( | std::ostream & | stream, | |
int | indent | |||
) | const [private, virtual] |
Implements node_impl.
Definition at line 171 of file node_impl.cpp.
References definition(), parameters(), node::print(), and print_identifier_list().
00173 { 00174 stream << std::setw(indent) << "" << "fun\n"; 00175 print_identifier_list(stream, parameters()); 00176 stream << '='; 00177 definition().print(stream, indent + 2); 00178 }
double node_function::evaluate_node | ( | ) | const [private, virtual] |
Implements node_impl.
Definition at line 180 of file node_impl.cpp.
References definition(), and node::evaluate().
00182 { 00183 return definition().evaluate(); 00184 }
identifier_list const & node_function::evaluate_parameters | ( | ) | const [private, virtual] |
Reimplemented from node_impl.
Definition at line 186 of file node_impl.cpp.
References parameters().
00188 { 00189 return parameters(); 00190 }
identifier_list node_function::parameters_ [private] |
node node_function::definition_ [private] |