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

Definition at line 664 of file mcp.cc.

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

665 {
666  Configuration conf(argv[0]);
667  conf.SetPrintUsage(PrintUsage);
669 
670  if (!conf.DoParse(argc, argv, PrintHelp))
671  return 127;
672 
673  //try
674  {
675  // No console access at all
676  if (!conf.Has("console"))
677  {
678 // if (conf.Get<bool>("no-dim"))
679 // return RunShell<LocalStream, StateMachine, ConnectionFSC>(conf);
680 // else
681  return RunShell<LocalStream>(conf);
682  }
683  // Cosole access w/ and w/o Dim
684 /* if (conf.Get<bool>("no-dim"))
685  {
686  if (conf.Get<int>("console")==0)
687  return RunShell<LocalShell, StateMachine, ConnectionFSC>(conf);
688  else
689  return RunShell<LocalConsole, StateMachine, ConnectionFSC>(conf);
690  }
691  else
692 */ {
693  if (conf.Get<int>("console")==0)
694  return RunShell<LocalShell>(conf);
695  else
696  return RunShell<LocalConsole>(conf);
697  }
698  }
699  /*catch (std::exception& e)
700  {
701  cerr << "Exception: " << e.what() << endl;
702  return -1;
703  }*/
704 
705  return 0;
706 }
void PrintUsage()
Definition: mcp.cc:627
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintHelp()
Definition: mcp.cc:642
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: