#include <cstdlib>
#include <iostream>
#include <string>
#include <OMKController.h>
#include <OMKException.h>
#include <OMKSimpleOpenMASK3Loader.h>
#include <OMKPluginsLoader.h>
Include dependency graph for OMKmain.cpp:
Go to the source code of this file.
Functions | |
void | usage (const std::string &s) |
int | main (int argc, char *argv[]) |
Definition at line 35 of file OMKmain.cpp.
References usage().
00036 { 00037 if (argc != 2) 00038 { 00039 usage( argv[0] ) ; 00040 } 00041 00042 try 00043 { 00044 // construction of a simulation tree for root 00045 SimpleOpenMASK3Loader loader( argv[1] ) ; 00046 00047 // controller 00048 Controller controller( *loader.getRootObjectDescriptor(), 0 ) ; 00049 00050 // load the Plugins described in the configuration file 00051 PluginsLoader::getInstance().init( controller ) ; 00052 00053 // finally we initialise and run the simulation 00054 controller.init(); 00055 controller.run() ; 00056 } 00057 catch( Exception& e ) 00058 { 00059 std::cerr << "Uncaught exception: " << e << std::endl ; 00060 } 00061 00062 return 0 ; 00063 }
void usage | ( | const std::string & | s | ) |
Definition at line 29 of file OMKmain.cpp.
Referenced by main().
00030 { 00031 std::cerr << "Usage: " << s << " <OpenMASK configuration file>" << std::endl ; 00032 exit( 1 ) ; 00033 }
Documentation generated on Mon Jun 9 11:45:58 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |