GNode library (C++)
Loading...
Searching...
No Matches
gnode::LinkView Struct Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LinkView()

gnode::LinkView::LinkView ( const Link link,
const Node node_from,
const Node node_to 
)

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.

Parameters
linkRaw link definition.
node_fromSource node associated with the link.
node_toDestination node associated with the link.

Member Function Documentation

◆ print()

void gnode::LinkView::print ( int  indent = 0) const

Print the details of the Link.

◆ to_string()

std::string gnode::LinkView::to_string ( int  indent = 0) const

Export to a string the details of the Link.

Member Data Documentation

◆ data_type_from

std::string gnode::LinkView::data_type_from

Data type of the source port.

◆ data_type_to

std::string gnode::LinkView::data_type_to

Data type of the destination port.

◆ from

std::string gnode::LinkView::from

Identifier of the source node.

◆ port_from

int gnode::LinkView::port_from

Port number on the source node.

◆ port_label_from

std::string gnode::LinkView::port_label_from

Label of the source port.

◆ port_label_to

std::string gnode::LinkView::port_label_to

Label of the destination port.

◆ port_to

int gnode::LinkView::port_to

Port number on the destination node.

◆ to

std::string gnode::LinkView::to

Identifier of the destination node.


The documentation for this struct was generated from the following file: