node_subtract Class Reference

#include <node_impl.hpp>

Inheritance diagram for node_subtract:

node_binary node_impl

List of all members.

Public Member Functions

 node_subtract (node left, node right)

Private Member Functions

virtual void print_node (std::ostream &stream, int indent) const
virtual double evaluate_node () const


Detailed Description

Subtraction.

Definition at line 154 of file node_impl.hpp.


Constructor & Destructor Documentation

node_subtract::node_subtract ( node  left,
node  right 
)

Definition at line 257 of file node_impl.cpp.

00258 : node_binary(left, right)
00259 {}


Member Function Documentation

void node_subtract::print_node ( std::ostream &  stream,
int  indent 
) const [private, virtual]

Implements node_binary.

Definition at line 261 of file node_impl.cpp.

References node_binary::left(), node::print(), and node_binary::right().

00263 {
00264   stream << std::setw(indent) << "" << "-\n";
00265   left().print(stream, indent + 2);
00266   right().print(stream, indent + 2);
00267 }

double node_subtract::evaluate_node (  )  const [private, virtual]

Implements node_binary.

Definition at line 269 of file node_impl.cpp.

References node_binary::evaluate_left(), and node_binary::evaluate_right().

00271 {
00272   return evaluate_left() - evaluate_right();
00273 }


The documentation for this class was generated from the following files:
Generated on Sun Nov 30 10:05:07 2008 for Calculator by  doxygen 1.5.3