#include <node_impl.hpp>
Public Member Functions | |
node_add (node left, node right) | |
node_add (std::istream &stream) | |
Private Member Functions | |
virtual void | print_node (std::ostream &stream, int indent) const |
virtual number | evaluate_node () const |
virtual void | save_node (std::ostream &stream) const |
Definition at line 181 of file node_impl.hpp.
node_add::node_add | ( | std::istream & | stream | ) |
void node_add::print_node | ( | std::ostream & | stream, | |
int | indent | |||
) | const [private, virtual] |
Implements node_binary.
Definition at line 450 of file node_impl.cpp.
References node_binary::left(), node::print(), and node_binary::right().
00452 { 00453 stream << std::setw(indent) << "" << "+\n"; 00454 left().print(stream, indent + 2); 00455 right().print(stream, indent + 2); 00456 }
number node_add::evaluate_node | ( | ) | const [private, virtual] |
Implements node_binary.
Definition at line 458 of file node_impl.cpp.
References node_binary::evaluate_left(), and node_binary::evaluate_right().
00460 { 00461 return evaluate_left() + evaluate_right(); 00462 }
void node_add::save_node | ( | std::ostream & | stream | ) | const [private, virtual] |
Implements node_binary.
Definition at line 464 of file node_impl.cpp.
References node_binary::left(), node_binary::right(), and node::save().