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

Definition at line 395 of file pfminictrl.cc.

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

396 {
397  Configuration conf(argv[0]);
398  conf.SetPrintUsage(PrintUsage);
400  SetupConfiguration(conf);
401 
402  if (!conf.DoParse(argc, argv, PrintHelp))
403  return 127;
404 
405  // No console access at all
406  if (!conf.Has("console"))
407  {
408  if (conf.Get<bool>("no-dim"))
409  return RunShell<LocalStream, StateMachine, ConnectionPFmini>(conf);
410  else
411  return RunShell<LocalStream, StateMachineDim, ConnectionDimWeather>(conf);
412  }
413  // Cosole access w/ and w/o Dim
414  if (conf.Get<bool>("no-dim"))
415  {
416  if (conf.Get<int>("console")==0)
417  return RunShell<LocalShell, StateMachine, ConnectionPFmini>(conf);
418  else
419  return RunShell<LocalConsole, StateMachine, ConnectionPFmini>(conf);
420  }
421  else
422  {
423  if (conf.Get<int>("console")==0)
424  return RunShell<LocalShell, StateMachineDim, ConnectionDimWeather>(conf);
425  else
426  return RunShell<LocalConsole, StateMachineDim, ConnectionDimWeather>(conf);
427  }
428 
429  return 0;
430 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void SetupConfiguration(Configuration &conf)
Definition: pfminictrl.cc:335
void PrintUsage()
Definition: pfminictrl.cc:358
void PrintHelp()
Definition: pfminictrl.cc:373
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: