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

Definition at line 350 of file evtserver.cc.

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

351 {
352  Configuration conf(argv[0]);
353  conf.SetPrintUsage(PrintUsage);
355  SetupConfiguration(conf);
356 
357  if (!conf.DoParse(argc, argv, PrintHelp))
358  return 127;
359 
360  //try
361  {
362  // No console access at all
363  if (!conf.Has("console"))
364  {
365 // if (conf.Get<bool>("no-dim"))
366 // return RunShell<LocalStream, StateMachine, ConnectionFSC>(conf);
367 // else
368  return RunShell<LocalStream>(conf);
369  }
370  // Cosole access w/ and w/o Dim
371 /* if (conf.Get<bool>("no-dim"))
372  {
373  if (conf.Get<int>("console")==0)
374  return RunShell<LocalShell, StateMachine, ConnectionFSC>(conf);
375  else
376  return RunShell<LocalConsole, StateMachine, ConnectionFSC>(conf);
377  }
378  else
379 */ {
380  if (conf.Get<int>("console")==0)
381  return RunShell<LocalShell>(conf);
382  else
383  return RunShell<LocalConsole>(conf);
384  }
385  }
386  /*catch (std::exception& e)
387  {
388  cerr << "Exception: " << e.what() << endl;
389  return -1;
390  }*/
391 
392  return 0;
393 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintUsage()
Definition: evtserver.cc:318
void PrintHelp()
Definition: evtserver.cc:328
void SetupConfiguration(Configuration &conf)
Definition: evtserver.cc:297
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: