node_unary Class Reference

#include <node_impl.hpp>

Inheritance diagram for node_unary:

node_impl node_negate

List of all members.

Public Member Functions

 node_unary (node operand)
node operand () const

Protected Member Functions

double evaluate_operand () const

Private Member Functions

virtual void print_node (std::ostream &stream, int indent) const =0
virtual double evaluate_node () const =0

Private Attributes

node operand_


Detailed Description

Abstract base class for unary operators.

Definition at line 120 of file node_impl.hpp.


Constructor & Destructor Documentation

node_unary::node_unary ( node  operand  ) 

Definition at line 243 of file node_impl.cpp.

00244 : node_impl(), operand_(operand)
00245 {}


Member Function Documentation

node node_unary::operand (  )  const

Definition at line 247 of file node_impl.cpp.

References operand_.

Referenced by evaluate_operand(), and node_negate::print_node().

00249 {
00250   return operand_;
00251 }

double node_unary::evaluate_operand (  )  const [protected]

Definition at line 253 of file node_impl.cpp.

References node::evaluate(), and operand().

Referenced by node_negate::evaluate_node().

00255 {
00256   return operand().evaluate();
00257 }

virtual void node_unary::print_node ( std::ostream &  stream,
int  indent 
) const [private, pure virtual]

Implements node_impl.

Implemented in node_negate.

virtual double node_unary::evaluate_node (  )  const [private, pure virtual]

Implements node_impl.

Implemented in node_negate.


Member Data Documentation

node node_unary::operand_ [private]

Definition at line 130 of file node_impl.hpp.

Referenced by operand().


The documentation for this class was generated from the following files:
Generated on Sun Nov 30 10:05:28 2008 for Calculator by  doxygen 1.5.3