#include <node_impl.hpp>

Public Member Functions | |
| node_impl () | |
| virtual | ~node_impl () |
| void | print (std::ostream &stream, int indent) const |
| double | evaluate () const |
| std::string | to_string () const |
| identifier_list const & | get_parameters () const |
| void | add_ref () |
| void | del_ref () |
Private Member Functions | |
| node_impl (node_impl const &n) | |
| not implemented | |
| node_impl & | operator= (node_impl const &n) |
| not implemented | |
| virtual void | print_node (std::ostream &stream, int indent) const =0 |
| virtual double | evaluate_node () const =0 |
| virtual std::string | evaluate_string () const |
| virtual identifier_list const & | evaluate_parameters () const |
Private Attributes | |
| std::size_t | refcount_ |
This class primarily manages the reference count.
Definition at line 19 of file node_impl.hpp.
| node_impl::node_impl | ( | ) |
| node_impl::~node_impl | ( | ) | [virtual] |
| node_impl::node_impl | ( | node_impl const & | n | ) | [private] |
not implemented
| void node_impl::print | ( | std::ostream & | stream, | |
| int | indent | |||
| ) | const |
Definition at line 18 of file node_impl.cpp.
References print_node().
Referenced by node::print().
00020 { 00021 print_node(stream, indent); 00022 }
| double node_impl::evaluate | ( | ) | const |
Definition at line 24 of file node_impl.cpp.
References evaluate_node().
Referenced by node::evaluate(), and evaluate_string().
00026 { 00027 return evaluate_node(); 00028 }
| std::string node_impl::to_string | ( | ) | const |
Definition at line 30 of file node_impl.cpp.
References evaluate_string().
Referenced by node::to_string().
00032 { 00033 return evaluate_string(); 00034 }
| identifier_list const & node_impl::get_parameters | ( | ) | const |
Definition at line 41 of file node_impl.cpp.
References evaluate_parameters().
Referenced by node::get_parameters().
00043 { 00044 return evaluate_parameters(); 00045 }
| void node_impl::add_ref | ( | ) |
Definition at line 36 of file node_impl.cpp.
References refcount_.
Referenced by node::node(), and node::operator=().
00037 { 00038 ++refcount_; 00039 }
| void node_impl::del_ref | ( | ) |
Definition at line 47 of file node_impl.cpp.
References refcount_.
Referenced by node::operator=(), and node::~node().
| virtual void node_impl::print_node | ( | std::ostream & | stream, | |
| int | indent | |||
| ) | const [private, pure virtual] |
Implemented in node_void, node_number, node_identifier, node_function, node_function_call, node_unary, node_binary, node_negate, node_add, node_subtract, node_multiply, and node_divide.
Referenced by print().
| virtual double node_impl::evaluate_node | ( | ) | const [private, pure virtual] |
Implemented in node_void, node_number, node_identifier, node_function, node_function_call, node_unary, node_binary, node_negate, node_add, node_subtract, node_multiply, and node_divide.
Referenced by evaluate().
| std::string node_impl::evaluate_string | ( | ) | const [private, virtual] |
Reimplemented in node_void, and node_identifier.
Definition at line 54 of file node_impl.cpp.
References evaluate().
Referenced by to_string().
00056 { 00057 std::ostringstream stream; 00058 stream << evaluate(); 00059 return stream.str(); 00060 }
| identifier_list const & node_impl::evaluate_parameters | ( | ) | const [private, virtual] |
Reimplemented in node_function.
Definition at line 62 of file node_impl.cpp.
Referenced by get_parameters().
00064 { 00065 static identifier_list const empty; 00066 return empty; 00067 }
std::size_t node_impl::refcount_ [private] |
1.5.3