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

Definition at line 499 of file sqmctrl.cc.

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

500 {
501  Configuration conf(argv[0]);
502  conf.SetPrintUsage(PrintUsage);
504  SetupConfiguration(conf);
505 
506  if (!conf.DoParse(argc, argv, PrintHelp))
507  return 127;
508 
509  // No console access at all
510  if (!conf.Has("console"))
511  {
512  if (conf.Get<bool>("no-dim"))
513  return RunShell<LocalStream, StateMachine, ConnectionSQM>(conf);
514  else
515  return RunShell<LocalStream, StateMachineDim, ConnectionDimWeather>(conf);
516  }
517  // Cosole access w/ and w/o Dim
518  if (conf.Get<bool>("no-dim"))
519  {
520  if (conf.Get<int>("console")==0)
521  return RunShell<LocalShell, StateMachine, ConnectionSQM>(conf);
522  else
523  return RunShell<LocalConsole, StateMachine, ConnectionSQM>(conf);
524  }
525  else
526  {
527  if (conf.Get<int>("console")==0)
528  return RunShell<LocalShell, StateMachineDim, ConnectionDimWeather>(conf);
529  else
530  return RunShell<LocalConsole, StateMachineDim, ConnectionDimWeather>(conf);
531  }
532 
533  return 0;
534 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintUsage()
Definition: sqmctrl.cc:462
void SetupConfiguration(Configuration &conf)
Definition: sqmctrl.cc:439
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintHelp()
Definition: sqmctrl.cc:477

+ Here is the call graph for this function: