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 &name)
std::string const & name () 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 name_


Detailed Description

Identifier data type. Used for variable references.

Definition at line 76 of file node_impl.hpp.


Constructor & Destructor Documentation

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

Definition at line 115 of file node_impl.cpp.

00116 : node_impl(), name_(name)
00117 {}


Member Function Documentation

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

Definition at line 119 of file node_impl.cpp.

References name_.

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

00121 {
00122   return name_;
00123 }

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

Implements node_impl.

Definition at line 125 of file node_impl.cpp.

References name().

00127 {
00128   stream << std::setw(indent) << "" << "identifier:" << name() << '\n';
00129 }

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

Implements node_impl.

Definition at line 131 of file node_impl.cpp.

References node::evaluate(), get_variable(), and name().

00133 {
00134   return get_variable(name()).evaluate();
00135 }

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

Reimplemented from node_impl.

Definition at line 137 of file node_impl.cpp.

References name().

00139 {
00140   return name();
00141 }


Member Data Documentation

std::string node_identifier::name_ [private]

Definition at line 85 of file node_impl.hpp.

Referenced by name().


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