CNPower Class Reference

Calculation node raising one operand to the power of the second. More...

#include <expression.h>

Inheritance diagram for CNPower:

CalcNode

List of all members.

Public Member Functions

 CNPower (CalcNode *_left, CalcNode *_right)
virtual ~CNPower ()
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

CalcNode * left
 left calculation operand
CalcNode * right
 right calculation operand


Detailed Description

Calculation node raising one operand to the power of the second.

Definition at line 264 of file expression.h.


Constructor & Destructor Documentation

CNPower::CNPower ( CalcNode *  _left,
CalcNode *  _right 
) [inline, explicit]

Definition at line 273 of file expression.h.

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

Definition at line 278 of file expression.h.

References left, and right.


Member Function Documentation

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

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

Implements CalcNode.

Definition at line 284 of file expression.h.

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

virtual void CNPower::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 289 of file expression.h.

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


Member Data Documentation

CalcNode* CNPower::left [private]

left calculation operand

Definition at line 267 of file expression.h.

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

right calculation operand

Definition at line 270 of file expression.h.

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


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

Generated on Sat Sep 5 10:26:25 2009 for Flex Bison C++ Example by  doxygen 1.5.9