- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# node_add Class Reference

`#include <node_impl.hpp>`

Inheritance diagram for node_add:

List of all members.

## Public Member Functions
| node_add (node left, node right)
## Private Member Functions
virtual void | print_node (std::ostream &stream, int indent) const
virtual double | evaluate_node () const

## Detailed Description

Addition.

Definition at line 145 of file node_impl.hpp.

## Constructor & Destructor Documentation

node_add::node_add | ( | node | left,
|  | node | right |
| ) |  |  |

Definition at line 238 of file node_impl.cpp.

    00239 : node_binary(left, right)
    00240 {}

## Member Function Documentation

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

Implements node_binary.

Definition at line 242 of file node_impl.cpp.

References node_binary::left(), node::print(), and node_binary::right().

    00244 {
    00245   stream << std::setw(indent) << "" << "+\n";
    00246   left().print(stream, indent + 2);
    00247   right().print(stream, indent + 2);
    00248 }

double node_add::evaluate_node | ( |  | ) | const`[private, virtual]`

Implements node_binary.

Definition at line 250 of file node_impl.cpp.

References node_binary::evaluate_left(), and node_binary::evaluate_right().

    00252 {
    00253   return evaluate_left() + evaluate_right();
    00254 }

The documentation for this class was generated from the following files:

- node_impl.hpp
- node_impl.cpp