int main(int argc, char* argv[]) { DefaultConstructor(); ManipulateNodesEdges(); SetNodeData(); UpdateNodeData(); SetEdgeData(); UpdateEdgeData(); SortNodeData(); }
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); } }