- Main Page
- Classes
- Files

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

# node_subtract Class Reference

`#include <node_impl.hpp>`

Inheritance diagram for node_subtract:

List of all members.

## Public Member Functions
| node_subtract (node left, node right)
| node_subtract (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

Subtraction.

Definition at line 192 of file node_impl.hpp.

## Constructor & Destructor Documentation

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

Definition at line 474 of file node_impl.cpp.

    00475 : node_binary(left, right)
    00476 {}

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

Definition at line 478 of file node_impl.cpp.

    00479 : node_binary(stream)
    00480 {}

## Member Function Documentation

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

Implements node_binary.

Definition at line 482 of file node_impl.cpp.

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

    00484 {
    00485   stream << std::setw(indent) << "" << "-\n";
    00486   left().print(stream, indent + 2);
    00487   right().print(stream, indent + 2);
    00488 }

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

Implements node_binary.

Definition at line 490 of file node_impl.cpp.

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

    00492 {
    00493   return evaluate_left() - evaluate_right();
    00494 }

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

Implements node_binary.

Definition at line 496 of file node_impl.cpp.

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

    00498 {
    00499   stream << "subtract ";
    00500   left().save(stream);
    00501   right().save(stream);
    00502 }

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

- node_impl.hpp
- node_impl.cpp