- 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)
| node_add (std::istream &stream)
## Private Member Functions
virtual void | print_node (std::ostream &stream, int indent) const
virtual double | evaluate_node () const
virtual void | save_node (std::ostream &stream) const

## Detailed Description

Addition.

Definition at line 181 of file node_impl.hpp.

## Constructor & Destructor Documentation

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

Definition at line 443 of file node_impl.cpp.

    00444 : node_binary(left, right)
    00445 {}

node_add::node_add | ( | std::istream & | stream | ) |

Definition at line 447 of file node_impl.cpp.

    00448 : node_binary(stream)
    00449 {}

## Member Function Documentation

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

Implements node_binary.

Definition at line 451 of file node_impl.cpp.

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

    00453 {
    00454   stream << std::setw(indent) << "" << "+\n";
    00455   left().print(stream, indent + 2);
    00456   right().print(stream, indent + 2);
    00457 }

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

Implements node_binary.

Definition at line 459 of file node_impl.cpp.

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

    00461 {
    00462   return evaluate_left() + evaluate_right();
    00463 }

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

Implements node_binary.

Definition at line 465 of file node_impl.cpp.

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

    00467 {
    00468   stream << "add ";
    00469   left().save(stream);
    00470   right().save(stream);
    00471 }

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

- node_impl.hpp
- node_impl.cpp