// Copyright (C) 2001 Jean-Marc Valin #include "UIDocument.h" #include #include "ParameterSet.h" #include "ObjectRef.h" #include "path.h" #include using namespace std; using namespace FD; int main(int argc, char **argv) { if (argc!=4) { cerr << "usage: codeflow " << endl; exit(1); } cerr << "Warning: automatic code generation is in a very experimental stage right now\n"; try { scanDL(); //UIDocument::loadAllInfo(); UINodeRepository::Scan(); UIDocument *doc = new UIDocument(argv[1]); doc->load(); ofstream out(argv[2]); set nodeList = doc->genCode(out, argv[3]); set fileList; for (set::iterator it=nodeList.begin();it!=nodeList.end();it++) { NodeInfo *info = UINodeRepository::Find(*it); if (info) fileList.insert(fileList.begin(), info->sourceFile); //fileList.insert(fileList.begin(), UIDocument::externalDocInfo[*it]->sourceFile); } UINodeRepository::ProcessDependencies(fileList); cerr << "dependencies:\n"; for (set::iterator it=fileList.begin();it!=fileList.end();it++) cerr << *it << endl; } catch (BaseException *e) { e->print(); } catch (...) { cerr<<"Unhandled exception in "<