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

Definition at line 729 of file lidctrl.cc.

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

730 {
731  Configuration conf(argv[0]);
732  conf.SetPrintUsage(PrintUsage);
734  SetupConfiguration(conf);
735 
736  if (!conf.DoParse(argc, argv, PrintHelp))
737  return 127;
738 
739  // No console access at all
740  if (!conf.Has("console"))
741  {
742  if (conf.Get<bool>("no-dim"))
743  return RunShell<LocalStream, StateMachine, ConnectionLid>(conf);
744  else
745  return RunShell<LocalStream, StateMachineDim, ConnectionDimWeather>(conf);
746  }
747  // Cosole access w/ and w/o Dim
748  if (conf.Get<bool>("no-dim"))
749  {
750  if (conf.Get<int>("console")==0)
751  return RunShell<LocalShell, StateMachine, ConnectionLid>(conf);
752  else
753  return RunShell<LocalConsole, StateMachine, ConnectionLid>(conf);
754  }
755  else
756  {
757  if (conf.Get<int>("console")==0)
758  return RunShell<LocalShell, StateMachineDim, ConnectionDimWeather>(conf);
759  else
760  return RunShell<LocalConsole, StateMachineDim, ConnectionDimWeather>(conf);
761  }
762 
763  return 0;
764 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintUsage()
Definition: lidctrl.cc:692
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintHelp()
Definition: lidctrl.cc:707
void SetupConfiguration(Configuration &conf)
Definition: lidctrl.cc:667

+ Here is the call graph for this function: