#include <node_impl.hpp>

Public Member Functions | |
| node_identifier (std::string const &name) | |
| node_identifier (std::istream &stream) | |
| std::string const & | name () const |
Private Member Functions | |
| virtual void | print_node (std::ostream &stream, int indent) const |
| virtual double | evaluate_node () const |
| virtual std::string | evaluate_string () const |
| virtual void | save_node (std::ostream &stream) const |
Private Attributes | |
| std::string | name_ |
Definition at line 85 of file node_impl.hpp.
| node_identifier::node_identifier | ( | std::string const & | name | ) |
| node_identifier::node_identifier | ( | std::istream & | stream | ) |
Definition at line 177 of file node_impl.cpp.
References name_.
00178 : node_impl() 00179 { 00180 if (not (stream >> name_)) 00181 throw calc_error("malformed library file, cannot read identifier"); 00182 }
| std::string const & node_identifier::name | ( | ) | const |
Definition at line 184 of file node_impl.cpp.
References name_.
Referenced by evaluate_node(), evaluate_string(), print_node(), and save_node().
00186 { 00187 return name_; 00188 }
| void node_identifier::print_node | ( | std::ostream & | stream, | |
| int | indent | |||
| ) | const [private, virtual] |
Implements node_impl.
Definition at line 190 of file node_impl.cpp.
References name().
00192 { 00193 stream << std::setw(indent) << "" << "identifier " << name() << '\n'; 00194 }
| double node_identifier::evaluate_node | ( | ) | const [private, virtual] |
Implements node_impl.
Definition at line 196 of file node_impl.cpp.
References node::evaluate(), get_variable(), and name().
00198 { 00199 return get_variable(name()).evaluate(); 00200 }
| std::string node_identifier::evaluate_string | ( | ) | const [private, virtual] |
Reimplemented from node_impl.
Definition at line 202 of file node_impl.cpp.
References name().
00204 { 00205 return name(); 00206 }
| void node_identifier::save_node | ( | std::ostream & | stream | ) | const [private, virtual] |
Implements node_impl.
Definition at line 208 of file node_impl.cpp.
References name().
00210 { 00211 stream << "identifier " << name() << '\n'; 00212 }
std::string node_identifier::name_ [private] |
1.5.3