CNNegate Class Reference

Calculation node negating the value of the operand subtree. More...

#include <expression.h>

Inheritance diagram for CNNegate:

CalcNode

List of all members.

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

CalcNodenode
 calculation subtree


Detailed Description

Calculation node negating the value of the operand subtree.

Definition at line 64 of file expression.h.


Constructor & Destructor Documentation

CNNegate::CNNegate ( CalcNode _node  )  [inline, explicit]

Definition at line 70 of file expression.h.

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

Definition at line 75 of file expression.h.

References node.


Member Function Documentation

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

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

Implements CalcNode.

Definition at line 80 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 85 of file expression.h.

References CalcNode::indent(), node, and CalcNode::print().


Member Data Documentation

calculation subtree

Definition at line 67 of file expression.h.

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


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