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

Definition at line 1694 of file cosyctrl.cc.

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

1695 {
1696  Configuration conf(argv[0]);
1697  conf.SetPrintUsage(PrintUsage);
1699  SetupConfiguration(conf);
1700 
1701  if (!conf.DoParse(argc, argv, PrintHelp))
1702  return 127;
1703 
1704  //try
1705  {
1706  // No console access at all
1707  if (!conf.Has("console"))
1708  {
1709  if (conf.Get<bool>("no-dim"))
1710  return RunShell<LocalStream, StateMachine, ConnectionDrive>(conf);
1711  else
1712  return RunShell<LocalStream, StateMachineDim, ConnectionDimDrive>(conf);
1713  }
1714  // Cosole access w/ and w/o Dim
1715  if (conf.Get<bool>("no-dim"))
1716  {
1717  if (conf.Get<int>("console")==0)
1718  return RunShell<LocalShell, StateMachine, ConnectionDrive>(conf);
1719  else
1720  return RunShell<LocalConsole, StateMachine, ConnectionDrive>(conf);
1721  }
1722  else
1723  {
1724  if (conf.Get<int>("console")==0)
1725  return RunShell<LocalShell, StateMachineDim, ConnectionDimDrive>(conf);
1726  else
1727  return RunShell<LocalConsole, StateMachineDim, ConnectionDimDrive>(conf);
1728  }
1729  }
1730  /*catch (std::exception& e)
1731  {
1732  cerr << "Exception: " << e.what() << endl;
1733  return -1;
1734  }*/
1735 
1736  return 0;
1737 }
void PrintHelp()
Definition: cosyctrl.cc:1672
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void SetupConfiguration(Configuration &conf)
Definition: cosyctrl.cc:1628
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintUsage()
Definition: cosyctrl.cc:1657

+ Here is the call graph for this function: