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

Definition at line 948 of file fscctrl.cc.

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

949 {
950  Configuration conf(argv[0]);
951  conf.SetPrintUsage(PrintUsage);
953  SetupConfiguration(conf);
954 
955  if (!conf.DoParse(argc, argv, PrintHelp))
956  return 127;
957 
958  //try
959  {
960  // No console access at all
961  if (!conf.Has("console"))
962  {
963  if (conf.Get<bool>("no-dim"))
964  return RunShell<LocalStream, StateMachine, ConnectionFSC>(conf);
965  else
966  return RunShell<LocalStream, StateMachineDim, ConnectionDimFSC>(conf);
967  }
968  // Cosole access w/ and w/o Dim
969  if (conf.Get<bool>("no-dim"))
970  {
971  if (conf.Get<int>("console")==0)
972  return RunShell<LocalShell, StateMachine, ConnectionFSC>(conf);
973  else
974  return RunShell<LocalConsole, StateMachine, ConnectionFSC>(conf);
975  }
976  else
977  {
978  if (conf.Get<int>("console")==0)
979  return RunShell<LocalShell, StateMachineDim, ConnectionDimFSC>(conf);
980  else
981  return RunShell<LocalConsole, StateMachineDim, ConnectionDimFSC>(conf);
982  }
983  }
984  /*catch (std::exception& e)
985  {
986  cerr << "Exception: " << e.what() << endl;
987  return -1;
988  }*/
989 
990  return 0;
991 }
void SetupConfiguration(Configuration &conf)
Definition: fscctrl.cc:888
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintHelp()
Definition: fscctrl.cc:926
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintUsage()
Definition: fscctrl.cc:911

+ Here is the call graph for this function: