Calculator  Step 6
Public Member Functions | Private Member Functions | List of all members
node_void Class Reference

#include <node_impl.hpp>

Inheritance diagram for node_void:
node_impl

Public Member Functions

 node_void ()
 
 node_void (std::istream &stream)
 
- Public Member Functions inherited from node_impl
 node_impl ()
 
virtual ~node_impl ()
 
 node_impl (node_impl &&)=default
 
node_imploperator= (node_impl &&)=default
 
void print (std::ostream &stream, int indent) const
 
number evaluate () const
 
std::string to_string () const
 
identifier_list const & get_parameters () const
 
void save (std::ostream &stream) const
 

Private Member Functions

virtual void print_node (std::ostream &stream, int indent) const override
 
virtual number evaluate_node () const override
 
virtual std::string evaluate_string () const override
 
virtual void save_node (std::ostream &stream) const override
 

Additional Inherited Members

- Static Public Member Functions inherited from node_impl
static std::shared_ptr< node_implread_node (std::istream &stream)
 

Detailed Description

Void data type. Currently used only for the node default constructor.

Definition at line 54 of file node_impl.hpp.

Constructor & Destructor Documentation

node_void::node_void ( )

Definition at line 93 of file node_impl.cpp.

94 : node_impl{}
95 {}
node_void::node_void ( std::istream &  stream)

Definition at line 97 of file node_impl.cpp.

98 : node_impl{}
99 {}

Member Function Documentation

number node_void::evaluate_node ( ) const
overrideprivatevirtual

Implements node_impl.

Definition at line 107 of file node_impl.cpp.

109 {
110  return number();
111 }
std::string node_void::evaluate_string ( ) const
overrideprivatevirtual

Reimplemented from node_impl.

Definition at line 113 of file node_impl.cpp.

115 {
116  return std::string{};
117 }
void node_void::print_node ( std::ostream &  stream,
int  indent 
) const
overrideprivatevirtual

Implements node_impl.

Definition at line 101 of file node_impl.cpp.

103 {
104  stream << std::setw(indent) << "" << "void\n";
105 }
void node_void::save_node ( std::ostream &  stream) const
overrideprivatevirtual

Implements node_impl.

Definition at line 119 of file node_impl.cpp.

121 {
122  stream << "void\n";
123 }

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