node_identifier Class Reference

#include <node_impl.hpp>

Inheritance diagram for node_identifier:

node_impl

List of all members.

Public Member Functions

 node_identifier (std::string const &identifier)
std::string identifier () const

Private Member Functions

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

Private Attributes

std::string identifier_


Detailed Description

Identifier data type. Used in assignments and for variable references in expressions.

Definition at line 73 of file node_impl.hpp.


Constructor & Destructor Documentation

node_identifier::node_identifier ( std::string const &  identifier  ) 

Definition at line 101 of file node_impl.cpp.

00102 : node_impl(), identifier_(identifier)
00103 {}


Member Function Documentation

std::string node_identifier::identifier (  )  const

Definition at line 105 of file node_impl.cpp.

References identifier_.

Referenced by evaluate_node(), evaluate_string(), and print_node().

00107 {
00108   return identifier_;
00109 }

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

Implements node_impl.

Definition at line 111 of file node_impl.cpp.

References identifier().

00113 {
00114   stream << std::setw(indent) << "" << identifier() << '\n';
00115 }

double node_identifier::evaluate_node (  )  const [private, virtual]

Implements node_impl.

Definition at line 117 of file node_impl.cpp.

References get_variable(), and identifier().

00119 {
00120   return get_variable(identifier());
00121 }

std::string node_identifier::evaluate_string (  )  const [private, virtual]

Reimplemented from node_impl.

Definition at line 123 of file node_impl.cpp.

References identifier().

00125 {
00126   return identifier();
00127 }


Member Data Documentation

std::string node_identifier::identifier_ [private]

Definition at line 82 of file node_impl.hpp.

Referenced by identifier().


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