#include <expression.h>
Public Member Functions | |
CNNegate (CalcNode *_node) | |
virtual | ~CNNegate () |
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 * | node |
calculation subtree |
Definition at line 63 of file expression.h.
CNNegate::CNNegate | ( | CalcNode * | _node | ) | [inline, explicit] |
Definition at line 69 of file expression.h.
virtual CNNegate::~CNNegate | ( | ) | [inline, virtual] |
virtual double CNNegate::evaluate | ( | ) | const [inline, virtual] |
evaluate the complete calculation tree and return the floating point result value
Implements CalcNode.
Definition at line 79 of file expression.h.
References CalcNode::evaluate(), and node.
virtual void CNNegate::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 84 of file expression.h.
References CalcNode::indent(), node, and CalcNode::print().
CalcNode* CNNegate::node [private] |
calculation subtree
Definition at line 66 of file expression.h.
Referenced by evaluate(), print(), and ~CNNegate().