Esempio n. 1
0
int main(int argc, char* argv[]) {
  DefaultConstructor();
  ManipulateNodesEdges();
  SetNodeData();
  UpdateNodeData();
  SetEdgeData();
  UpdateEdgeData();
  SortNodeData();
}
Esempio n. 2
0
static void NodeCmdFn(cmdScannerADT cs)
{
    scannerADT scanner;
    symtabADT nodeTable;
    graphADT graph;
    nodeADT node;
    string label;

    scanner = GetTokenScanner(cs);
    graph = GetCommandData(cs);
    nodeTable = GetGraphData(graph);
    label = ReadToken(scanner);
    if (Lookup(nodeTable, label) != UNDEFINED) {
        printf("That node already exists\n");
    } else {
        node = NewNode(graph);
        SetNodeData(node, label);
        Enter(nodeTable, label, node);
    }
}