|
GNode library (C++)
|
Provides a resolved and enriched view of a graph link. More...
#include <link.hpp>
Public Member Functions | |
| LinkView (const Link &link, const Node &node_from, const Node &node_to) | |
Constructs a LinkView from a raw link and its associated nodes. | |
| void | print (int indent=0) const |
Print the details of the Link. | |
| std::string | to_string (int indent=0) const |
Export to a string the details of the Link. | |
Public Attributes | |
| std::string | from |
| Identifier of the source node. | |
| std::string | to |
| Identifier of the destination node. | |
| int | port_from |
| Port number on the source node. | |
| int | port_to |
| Port number on the destination node. | |
| std::string | port_label_from |
| Label of the source port. | |
| std::string | port_label_to |
| Label of the destination port. | |
| std::string | data_type_from |
| Data type of the source port. | |
| std::string | data_type_to |
| Data type of the destination port. | |
Provides a resolved and enriched view of a graph link.
LinkView extends the raw Link information with additional contextual data extracted from the connected nodes, such as human-readable port labels.
This structure is intended for runtime querying, visualization, debugging, or user interface purposes, while keeping the original Link structure lightweight and focused on graph topology representation.
Constructs a LinkView from a raw link and its associated nodes.
This constructor extracts additional contextual information from the provided nodes, such as port labels, while preserving the original link connectivity information.
| link | Raw link definition. |
| node_from | Source node associated with the link. |
| node_to | Destination node associated with the link. |
| void gnode::LinkView::print | ( | int | indent = 0 | ) | const |
Print the details of the Link.
| std::string gnode::LinkView::to_string | ( | int | indent = 0 | ) | const |
Export to a string the details of the Link.
| std::string gnode::LinkView::data_type_from |
Data type of the source port.
| std::string gnode::LinkView::data_type_to |
Data type of the destination port.
| std::string gnode::LinkView::from |
Identifier of the source node.
| int gnode::LinkView::port_from |
Port number on the source node.
| std::string gnode::LinkView::port_label_from |
Label of the source port.
| std::string gnode::LinkView::port_label_to |
Label of the destination port.
| int gnode::LinkView::port_to |
Port number on the destination node.
| std::string gnode::LinkView::to |
Identifier of the destination node.