C4 Engine
C4 Engine API Documentation

Node::GetHub

Defined in:  C4Node.h
Returns the hub attached to a node.
Prototype

Hub *GetHub(voidconst;

Description
The GetHub function returns a pointer to the hub attached to a node. A hub exists for a node whenever the node has any outgoing or incoming connector. If a node has no hub, then the GetHub function returns nullptr.

To iterate over the connectors for a node, the member functions of the GraphElement base class can be used. For example, to iterate over all outgoing connectors, call the GraphElement::GetFirstOutgoingRelation function to retrieve the first connector, and then call GraphRelation::GetNextOutgoingRelation function for the connector until nullptr is returned.
See Also

Hub

Connector

Node::AddConnector

Node::RemoveConnector

Node::GetConnectedNode

Node::SetConnectedNode