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

Definition at line 2356 of file biasctrl.cc.

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

2357 {
2358  Configuration conf(argv[0]);
2359  conf.SetPrintUsage(PrintUsage);
2361  SetupConfiguration(conf);
2362 
2363  if (!conf.DoParse(argc, argv, PrintHelp))
2364  return 127;
2365 
2366  //try
2367  {
2368  // No console access at all
2369  if (!conf.Has("console"))
2370  {
2371  if (conf.Get<bool>("no-dim"))
2372  return RunShell<LocalStream, StateMachine, ConnectionBias>(conf);
2373  else
2374  return RunShell<LocalStream, StateMachineDim, ConnectionDimBias>(conf);
2375  }
2376  // Cosole access w/ and w/o Dim
2377  if (conf.Get<bool>("no-dim"))
2378  {
2379  if (conf.Get<int>("console")==0)
2380  return RunShell<LocalShell, StateMachine, ConnectionBias>(conf);
2381  else
2382  return RunShell<LocalConsole, StateMachine, ConnectionBias>(conf);
2383  }
2384  else
2385  {
2386  if (conf.Get<int>("console")==0)
2387  return RunShell<LocalShell, StateMachineDim, ConnectionDimBias>(conf);
2388  else
2389  return RunShell<LocalConsole, StateMachineDim, ConnectionDimBias>(conf);
2390  }
2391  }
2392  /*catch (std::exception& e)
2393  {
2394  cerr << "Exception: " << e.what() << endl;
2395  return -1;
2396  }*/
2397 
2398  return 0;
2399 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void SetupConfiguration(Configuration &conf)
Definition: biasctrl.cc:2285
void PrintUsage()
Definition: biasctrl.cc:2316
void PrintHelp()
Definition: biasctrl.cc:2334
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: