/* * DEMETER System Version 5.0 * Copyright (c) 1993 Northeastern University * */ #include #include #include #include "cdlearn.h" /* * GEN_DIR is a global variable containing the path of the generation * environment. This path is used to find the cd-print and cd-parse * class dictionaries. * Do NOT delete the following statement. */ char* GEN_DIR = getenv( "GEN_DIR" ); extern int _demeter_hash(const char* classname); int greeting = _demeter_hash("Greeting"); char* Usage = " Usages: cd-learn obj-input \n or cd-learn obj-input cd-input\n or cd-learn -or obj-input rename-input\n or cd-learn -cr cd-input rename-input\n or cd-learn -r obj-input cd-input rename-input\n"; void print_usages() { cerr <set_cd_in (new Demeter_in(new Cd_graph (new Adjacency_Nlist()))); // read it (iCDL->get_cd_in())->g_parse(dem_in); } if (obj == 1) { // read object graph (iCDL->get_obj_graph())->g_parse(obj_in); } iCDL->Run (iCDL->get_obj_graph(), iCDL->get_cd_in()); if (rename == 1) { Renames* iRenames = new Renames(); iRenames = (Renames*)iRenames->g_parse(rename_in); iRenames->Rename(iCDL->get_cd_out()); } iCDL->RemoveDuplicates(); cout << "\n;; The learned class dictionary graph is:\n\n"<PrintOutput(); // (iCDL->get_cd_out())->g_print(); cout << endl; return ( 0 ); }