vg4->nodelink->moveto()
Get nodes to move from a start node up to a destination node.
SYNTAX
int
vg4->nodelink->moveto(struct VG_Nodelink *ndlnk,
const char *nodeid1,
const char *nodeid2,
const char ***moveids,
VG_BOOL withdeact)
FUNCTION PARAMETERS
| ndlnk | Nodelink |
| nodeid1 | Start node |
| nodeid2 | Destination node |
| moveids | For returning nodes to pass to destination node (excluding start node), must be freed with free() |
| withdeact | Whether ignore deactivation of links |
RETURN VALUE
Returns number of nodes in moveids
DESCRIPTION
Get nodes to move from a start node up to a destination node.
According to the distance between two nodes (see vg4->nodelink->add()) the shortest way will be used to get from nodeid1 to nodeid2.
Links deactivated by vg4->nodelink->deactivate() will be ignored and cannot be used to pass.
With withdeact set to VG_TRUE, all deactivations are ignored.
EXAMPLE
/* get nodes from NODE1 to NODE2 */ const char **moveids; int nmove, i1; nmove = vg4->nodelink->moveto(ndlnk, "NODE1", "NODE2", &moveids, VG_FALSE); if (nmove > 0) { printf("NODE1"); for (i1 = 0; i1 < nmove; i1++) { printf(" -> %s", moveids[i1]); } free(moveids); printf("\n"); }