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

Definition at line 2838 of file ftmctrl.cc.

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

2839 {
2840  Configuration conf(argv[0]);
2841  conf.SetPrintUsage(PrintUsage);
2843  SetupConfiguration(conf);
2844 
2845  if (!conf.DoParse(argc, argv, PrintHelp))
2846  return 127;
2847 
2848  //try
2849  {
2850  // No console access at all
2851  if (!conf.Has("console"))
2852  {
2853  if (conf.Get<bool>("no-dim"))
2854  return RunShell<LocalStream, StateMachine, ConnectionFTM>(conf);
2855  else
2856  return RunShell<LocalStream, StateMachineDim, ConnectionDimFTM>(conf);
2857  }
2858  // Cosole access w/ and w/o Dim
2859  if (conf.Get<bool>("no-dim"))
2860  {
2861  if (conf.Get<int>("console")==0)
2862  return RunShell<LocalShell, StateMachine, ConnectionFTM>(conf);
2863  else
2864  return RunShell<LocalConsole, StateMachine, ConnectionFTM>(conf);
2865  }
2866  else
2867  {
2868  if (conf.Get<int>("console")==0)
2869  return RunShell<LocalShell, StateMachineDim, ConnectionDimFTM>(conf);
2870  else
2871  return RunShell<LocalConsole, StateMachineDim, ConnectionDimFTM>(conf);
2872  }
2873  }
2874  /*catch (std::exception& e)
2875  {
2876  cerr << "Exception: " << e.what() << endl;
2877  return -1;
2878  }*/
2879 
2880  return 0;
2881 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintHelp()
Definition: ftmctrl.cc:2816
void SetupConfiguration(Configuration &conf)
Definition: ftmctrl.cc:2729
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintUsage()
Definition: ftmctrl.cc:2801

+ Here is the call graph for this function: