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


Public Member Functions | |
| Input ()=default | |
| Default constructor for Input. | |
| Input (std::string label) | |
| Constructs an Input port with the specified label. | |
| virtual | ~Input ()=default |
| Virtual destructor for Input. | |
| PortType | get_port_type () const override |
| Returns the type of the port as an input port. | |
| T * | get_value_ref () const |
| Retrieves a reference to the data value stored in this input port. | |
| void * | get_value_ref_void () const override |
Retrieves a void* reference to the data value stored in this output port. | |
| void | set_data (std::shared_ptr< BaseData > data) override |
| Sets the data associated with this input 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 std::shared_ptr< BaseData > | get_data_shared_ptr_downcasted () const |
| Retrieves a shared pointer to the data associated with the port after downcasting. | |
Private Attributes | |
| std::weak_ptr< Data< T > > | data |
| A weak pointer to the data associated with this input port. | |
Additional Inherited Members | |
Protected Attributes inherited from gnode::Port | |
| std::string | data_type |
| A string representing the type name. | |
Template class for input ports, specialized by data type.
The Input class inherits from Port and provides methods for handling data specific to input ports.
| T | The data type that this input port will handle. |
|
default |
Default constructor for Input.
|
inline |
Constructs an Input port with the specified label.
| label | A string representing the label of the input port. |
Virtual destructor for Input.
|
inlineoverridevirtual |
Returns the type of the port as an input port.
This method overrides the base class implementation to indicate that this port is an input (PortType::IN).
PortType::IN. Implements gnode::Port.
|
inline |
Retrieves a reference to the data value stored in this input port.
|
inlineoverridevirtual |
Retrieves a void* reference to the data value stored in this output port.
void* pointer to the data value. Implements gnode::Port.
|
inlineoverridevirtual |
Sets the data associated with this input port.
| data | A shared pointer to the BaseData to set. |
Reimplemented from gnode::Port.
A weak pointer to the data associated with this input port.