/tags/rel-0-1-2/FreeSpeech/vflow/src/batchflow.cc

# · C++ · 32 lines · 26 code · 1 blank · 5 comment · 1 complexity · 2649f640ebfb79b467537ae0b163e3b2 MD5 · raw file

  1. #include "UIDocument.h"
  2. #include <string>
  3. #include "ParameterSet.h"
  4. #include "ObjectRef.h"
  5. int main(int argc, char **argv)
  6. {
  7. try {
  8. UIDocument::scanDL();
  9. } catch (BaseException *e)
  10. {
  11. e->print();
  12. delete e;
  13. exit(1);
  14. }
  15. UIDocument::loadExtDocInfo();
  16. ParameterSet param;
  17. for (int arg = 2; arg<argc; arg++)
  18. {
  19. char arg_name[100];
  20. sprintf (arg_name, "ARG%d", arg-1);
  21. param.add(arg_name, ObjectRef (new String (argv[arg])));
  22. }
  23. UIDocument *doc = new UIDocument(argv[1]);
  24. doc->load();
  25. doc->run(param);
  26. /*doc->export2net();
  27. string command = "xterm -e sh -c 'AudioNetwork " + doc->getPath() + doc->getName() + "et ; sleep 1000' &";
  28. cerr << command << endl;
  29. system (command.c_str());
  30. */
  31. }