FACT++  1.0
int main ( int  argc,
const char *  argv[] 
)

Definition at line 3149 of file drivectrl.cc.

References Configuration::DoParse(), Configuration::Get(), Configuration::Has(), PrintHelp(), PrintUsage(), Configuration::SetPrintUsage(), Main::SetupConfiguration(), and SetupConfiguration().

3150 {
3151  Configuration conf(argv[0]);
3152  conf.SetPrintUsage(PrintUsage);
3154  SetupConfiguration(conf);
3155 
3156  if (!conf.DoParse(argc, argv, PrintHelp))
3157  return 127;
3158 
3159  //try
3160  {
3161  // No console access at all
3162  if (!conf.Has("console"))
3163  {
3164  if (conf.Get<bool>("no-dim"))
3165  return RunShell<LocalStream, StateMachine, ConnectionDrive>(conf);
3166  else
3167  return RunShell<LocalStream, StateMachineDim, ConnectionDimDrive>(conf);
3168  }
3169  // Cosole access w/ and w/o Dim
3170  if (conf.Get<bool>("no-dim"))
3171  {
3172  if (conf.Get<int>("console")==0)
3173  return RunShell<LocalShell, StateMachine, ConnectionDrive>(conf);
3174  else
3175  return RunShell<LocalConsole, StateMachine, ConnectionDrive>(conf);
3176  }
3177  else
3178  {
3179  if (conf.Get<int>("console")==0)
3180  return RunShell<LocalShell, StateMachineDim, ConnectionDimDrive>(conf);
3181  else
3182  return RunShell<LocalConsole, StateMachineDim, ConnectionDimDrive>(conf);
3183  }
3184  }
3185  /*catch (std::exception& e)
3186  {
3187  cerr << "Exception: " << e.what() << endl;
3188  return -1;
3189  }*/
3190 
3191  return 0;
3192 }
void SetupConfiguration(Configuration &conf)
Definition: drivectrl.cc:3069
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintHelp()
Definition: drivectrl.cc:3127
void PrintUsage()
Definition: drivectrl.cc:3112

+ Here is the call graph for this function: