Calculator
Step 5
|
#include <node_impl.hpp>
Public Member Functions | |
node_unary (node operand) | |
node | operand () const |
Public Member Functions inherited from node_impl | |
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 | save (std::ostream &stream) const |
Protected Member Functions | |
node_unary (std::istream &stream) | |
double | evaluate_operand () const |
Private Member Functions | |
virtual void | print_node (std::ostream &stream, int indent) const override=0 |
virtual double | evaluate_node () const override=0 |
virtual void | save_node (std::ostream &stream) const override=0 |
Private Attributes | |
node | operand_ |
Additional Inherited Members | |
Static Public Member Functions inherited from node_impl | |
static std::shared_ptr< node_impl > | read_node (std::istream &stream) |
Abstract base class for unary operators.
Definition at line 131 of file node_impl.hpp.
node_unary::node_unary | ( | node | operand | ) |
Definition at line 352 of file node_impl.cpp.
|
protected |
Definition at line 356 of file node_impl.cpp.
|
overrideprivatepure virtual |
Implements node_impl.
Implemented in node_negate.
|
protected |
Definition at line 366 of file node_impl.cpp.
References node::evaluate(), and operand().
Referenced by node_negate::evaluate_node().
node node_unary::operand | ( | ) | const |
Definition at line 360 of file node_impl.cpp.
References operand_.
Referenced by evaluate_operand(), node_negate::print_node(), and node_negate::save_node().
|
overrideprivatepure virtual |
Implements node_impl.
Implemented in node_negate.
|
overrideprivatepure virtual |
Implements node_impl.
Implemented in node_negate.
|
private |
Definition at line 143 of file node_impl.hpp.
Referenced by operand().