node_divide Class Reference

#include <node_impl.hpp>

Inheritance diagram for node_divide:

node_binary node_impl

List of all members.

Public Member Functions

 node_divide (node left, node right)

Private Member Functions

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


Detailed Description

Division.

Definition at line 187 of file node_impl.hpp.


Constructor & Destructor Documentation

node_divide::node_divide ( node  left,
node  right 
)

Definition at line 363 of file node_impl.cpp.

00364 : node_binary(left, right)
00365 {}


Member Function Documentation

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

Implements node_binary.

Definition at line 367 of file node_impl.cpp.

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

00369 {
00370   stream << std::setw(indent) << "" << "/\n";
00371   left().print(stream, indent + 2);
00372   right().print(stream, indent + 2);
00373 }

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

Implements node_binary.

Definition at line 375 of file node_impl.cpp.

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

00377 {
00378   return evaluate_left() / evaluate_right();
00379 }


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