|
GNode library (C++)
|
Template class for output ports, specialized by data type. More...
#include <port.hpp>


Public Member Functions | |
| Output () | |
| Default constructor for Output. | |
| template<typename... Args> | |
| Output (std::string label, Args &&...args) | |
| Constructs an Output port with the specified label and additional arguments. | |
| virtual | ~Output ()=default |
| Virtual destructor for Output. | |
| std::shared_ptr< BaseData > | get_data_shared_ptr_downcasted () const override |
| Retrieves a shared pointer to the data associated with this output port after downcasting. | |
| std::string | get_data_type () const |
| Retrieves the type name of the data handled by this output port. | |
| PortType | get_port_type () const override |
| Returns the type of the port as an output port. | |
| T * | get_value_ref () const |
| Retrieves a reference to the data value stored in this output port. | |
| void * | get_value_ref_void () const override |
Retrieves a void* reference to the data value stored in this output port. | |
Public Member Functions inherited from gnode::Port | |
| Port ()=default | |
| Default constructor for Port. | |
| Port (std::string label) | |
| Constructs a Port with the specified label. | |
| virtual | ~Port ()=default |
| Virtual destructor for Port. | |
| std::string | get_data_type () const |
| Retrieves the type name of the data handled by this port. | |
| std::string | get_label () const |
| Retrieves the label of the port. | |
| virtual void | set_data (std::shared_ptr< BaseData >) |
| Sets the data associated with the port. | |
Private Attributes | |
| std::shared_ptr< Data< T > > | data |
| A shared pointer to the data associated with this output port. | |
Additional Inherited Members | |
Protected Attributes inherited from gnode::Port | |
| std::string | data_type |
| A string representing the type name. | |
Template class for output ports, specialized by data type.
The Output class inherits from Port and provides methods for handling data specific to output ports.
| T | The data type that this output port will handle. |
|
inline |
Default constructor for Output.
|
inlineexplicit |
Constructs an Output port with the specified label and additional arguments.
| Args | Types of the arguments passed to the Data<T> constructor. |
| label | A string representing the label of the output port. |
| args | Additional arguments passed to the Data<T> constructor. |
This constructor initializes an Output port with a given label and forwards any additional arguments to the Data<T> constructor using std::make_shared.
Virtual destructor for Output.
|
inlineoverridevirtual |
Retrieves a shared pointer to the data associated with this output port after downcasting.
Reimplemented from gnode::Port.
|
inline |
Retrieves the type name of the data handled by this output port.
|
inlineoverridevirtual |
Returns the type of the port as an output port.
This method overrides the base class implementation to indicate that this port is an output (PortType::OUT).
PortType::OUT. Implements gnode::Port.
|
inline |
Retrieves a reference to the data value stored in this output port.
|
inlineoverridevirtual |
Retrieves a void* reference to the data value stored in this output port.
void* pointer to the data value. Implements gnode::Port.
A shared pointer to the data associated with this output port.