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

 node_unary (std::istream &stream)
number evaluate_operand () const

Private Member Functions

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

Private Attributes

node operand_


Detailed Description

Abstract base class for unary operators.

Definition at line 135 of file node_impl.hpp.


Constructor & Destructor Documentation

node_unary::node_unary ( node  operand  ) 

Definition at line 359 of file node_impl.cpp.

00360 : node_impl(), operand_(operand)
00361 {}

node_unary::node_unary ( std::istream &  stream  )  [protected]

Definition at line 363 of file node_impl.cpp.

00364 : node_impl(), operand_(stream)
00365 {}


Member Function Documentation

node node_unary::operand (  )  const

Definition at line 367 of file node_impl.cpp.

References operand_.

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

00369 {
00370   return operand_;
00371 }

number node_unary::evaluate_operand (  )  const [protected]

Definition at line 373 of file node_impl.cpp.

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

Referenced by node_negate::evaluate_node().

00375 {
00376   return operand().evaluate();
00377 }

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

Implements node_impl.

Implemented in node_negate.

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

Implements node_impl.

Implemented in node_negate.

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

Implements node_impl.

Implemented in node_negate.


Member Data Documentation

node node_unary::operand_ [private]

Definition at line 147 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:06:53 2008 for Calculator by  doxygen 1.5.3