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

Definition at line 606 of file gcn.cc.

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

607 {
608  Configuration conf(argv[0]);
609  conf.SetPrintUsage(PrintUsage);
611  SetupConfiguration(conf);
612 
613  if (!conf.DoParse(argc, argv, PrintHelp))
614  return 127;
615 
616  //try
617  {
618  // No console access at all
619  if (!conf.Has("console"))
620  {
621  if (conf.Get<bool>("no-dim"))
622  return RunShell<LocalStream, StateMachine, ConnectionGCN>(conf);
623  else
624  return RunShell<LocalStream, StateMachineDim, ConnectionDimGCN>(conf);
625  }
626  // Cosole access w/ and w/o Dim
627  if (conf.Get<bool>("no-dim"))
628  {
629  if (conf.Get<int>("console")==0)
630  return RunShell<LocalShell, StateMachine, ConnectionGCN>(conf);
631  else
632  return RunShell<LocalConsole, StateMachine, ConnectionGCN>(conf);
633  }
634  else
635  {
636  if (conf.Get<int>("console")==0)
637  return RunShell<LocalShell, StateMachineDim, ConnectionDimGCN>(conf);
638  else
639  return RunShell<LocalConsole, StateMachineDim, ConnectionDimGCN>(conf);
640  }
641  }
642  /*catch (std::exception& e)
643  {
644  cerr << "Exception: " << e.what() << endl;
645  return -1;
646  }*/
647 
648  return 0;
649 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintHelp()
Definition: gcn.cc:584
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void SetupConfiguration(Configuration &conf)
Definition: gcn.cc:548
void PrintUsage()
Definition: gcn.cc:569

+ Here is the call graph for this function: