#include <expression.h>
Inheritance diagram for CNPower:
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 |
Definition at line 263 of file expression.h.
Definition at line 272 of file expression.h.
virtual CNPower::~CNPower | ( | ) | [inline, virtual] |
virtual double CNPower::evaluate | ( | ) | const [inline, virtual] |
evaluate the complete calculation tree and return the floating point result value
Implements CalcNode.
Definition at line 283 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 288 of file expression.h.
References CalcNode::indent(), left, CalcNode::print(), and right.
CalcNode* CNPower::left [private] |
left calculation operand
Definition at line 266 of file expression.h.
Referenced by evaluate(), print(), and ~CNPower().
CalcNode* CNPower::right [private] |
right calculation operand
Definition at line 269 of file expression.h.
Referenced by evaluate(), print(), and ~CNPower().