#include "RuntimeSALOME.hxx"
#include "Proc.hxx"
#include "Exception.hxx"
#include "Executor.hxx"
#include "parsers.hxx"
#include "VisitorSaveState.hxx"
#include "LoadState.hxx"
#include <iostream>
#include <fstream>
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 38 of file resume.cxx.
References YACS::ENGINE::Proc::accept(), YACS::ENGINE::VisitorSaveState::closeFileDump(), display(), YACS::ENGINE::Bloc::exUpdateState(), gui.CONNECTOR::f(), YACS::ENGINE::Runtime::fini(), YACS::ENGINE::getRuntime(), YACS::ENGINE::Bloc::init(), YACS::YACSLoader::load(), loader, YACS::ENGINE::VisitorSaveState::openFileDump(), p, YACS::ENGINE::stateLoader::parse(), YACS::ENGINE::Executor::RunW(), YACS::ENGINE::RuntimeSALOME::setRuntime(), YACS::Exception::what(), and YACS::ENGINE::Proc::writeDot().
40 if (argc != 3 && argc != 4)
42 cerr <<
"usage: " << argv[0] <<
" [--display=n] schema.xml state.xml" << endl;
52 if(std::string(argv[1]) ==
"--display=1")
54 else if(std::string(argv[1]) ==
"--display=2")
56 else if(std::string(argv[1]) ==
"--display=3")
60 RuntimeSALOME::setRuntime();
72 myStateLoader.parse(argv[argState]);
74 std::ofstream
f(
"toto");
77 cerr <<
"+++++++++++++++++++ start calculation +++++++++++++++++++" << endl;
78 executor.
RunW(p, display,
false);
79 cerr <<
"+++++++++++++++++++ end calculation +++++++++++++++++++" << endl;
80 std::ofstream g(
"titi");
84 vst.openFileDump(
"dumpState.xml");
93 cerr <<
"Caught a YACS exception" << endl;
94 cerr << e.
what() << endl;
98 catch (
const std::ios_base::failure&)
100 cerr <<
"Caught an io failure exception" << endl;
103 catch(CORBA::SystemException& ex)
105 cerr <<
"Caught a CORBA::SystemException." ;
108 CORBA::TypeCode_var tc = tmp.type();
109 const char *p = tc->name();
117 catch(omniORB::fatalException& fe)
119 cerr <<
"Caught omniORB::fatalException:" << endl;
120 cerr <<
" file: " << fe.file() << endl;
121 cerr <<
" line: " << fe.line() << endl;
122 cerr <<
" mesg: " << fe.errmsg() << endl;
127 cerr <<
"Caught unknown exception." << endl;