CNDivide Class Reference

Calculation node dividing two operand nodes. More...

#include <expression.h>

Inheritance diagram for CNDivide:

CalcNode

List of all members.

Public Member Functions

 CNDivide (CalcNode *_left, CalcNode *_right)
virtual ~CNDivide ()
virtual double evaluate () const
 evaluate the complete calculation tree and return the floating point result value
virtual void print (std::ostream &os, unsigned int depth) const
 output the calculation tree to the given stream.

Private Attributes

CalcNodeleft
 left calculation operand
CalcNoderight
 right calculation operand


Detailed Description

Calculation node dividing two operand nodes.

Definition at line 194 of file expression.h.


Constructor & Destructor Documentation

CNDivide::CNDivide ( CalcNode _left,
CalcNode _right 
) [inline, explicit]

Definition at line 203 of file expression.h.

virtual CNDivide::~CNDivide (  )  [inline, virtual]

Definition at line 208 of file expression.h.

References left, and right.


Member Function Documentation

virtual double CNDivide::evaluate (  )  const [inline, virtual]

evaluate the complete calculation tree and return the floating point result value

Implements CalcNode.

Definition at line 214 of file expression.h.

References CalcNode::evaluate(), left, and right.

virtual void CNDivide::print ( std::ostream &  os,
unsigned int  depth 
) const [inline, virtual]

output the calculation tree to the given stream.

tries to format the output to make tree levels visible.

Implements CalcNode.

Definition at line 219 of file expression.h.

References CalcNode::indent(), left, CalcNode::print(), and right.


Member Data Documentation

left calculation operand

Definition at line 197 of file expression.h.

Referenced by evaluate(), print(), and ~CNDivide().

right calculation operand

Definition at line 200 of file expression.h.

Referenced by evaluate(), print(), and ~CNDivide().


The documentation for this class was generated from the following file:

Generated on Thu Oct 23 11:13:54 2008 for Flex Bison C++ Example by  doxygen 1.5.6