#include <node_impl.hpp>
Public Member Functions | |
node_negate (node operand) | |
Private Member Functions | |
virtual void | print_node (std::ostream &stream, int indent) const |
virtual double | evaluate_node () const |
Definition at line 151 of file node_impl.hpp.
node_negate::node_negate | ( | node | operand | ) |
void node_negate::print_node | ( | std::ostream & | stream, | |
int | indent | |||
) | const [private, virtual] |
Implements node_unary.
Definition at line 292 of file node_impl.cpp.
References node_unary::operand(), and node::print().
00294 { 00295 stream << std::setw(indent) << "" << "-\n"; 00296 operand().print(stream, indent + 2); 00297 }
double node_negate::evaluate_node | ( | ) | const [private, virtual] |
Implements node_unary.
Definition at line 299 of file node_impl.cpp.
References node_unary::evaluate_operand().
00301 { 00302 return -evaluate_operand(); 00303 }