GraphNodePtrAt
Description
Get pointer to node payload at given node id.
Parameters
| Name | Direction | Description |
|---|---|---|
g |
in,out | Graph to query. |
node_id |
in | Node id to access. |
Success
Returns a pointer of type GRAPH_NODE_TYPE(g) * to the payload slot. The graph is not modified. The pointer is valid until the slot is committed for deletion.
Failure
Does not return - aborts via LOG_FATAL for an invalid or stale node id (caller bug).
Usage example (Cross-references)
Usage examples (Cross-references)
result = result && !GraphHasEdge(&graph, blue, green);
result = result && !GraphHasEdge(&graph, red, blue);
result = result && (ZstrCompare(*GraphNodePtrAt(&graph, red), "red") == 0);
GraphDeinit(&graph);
Last updated on