612 po::variables_map vm;
615 vm = conf.Parse(argc, argv);
617 catch (std::exception &e)
619 #if BOOST_VERSION > 104000 620 po::multiple_occurrences *MO =
dynamic_cast<po::multiple_occurrences*
>(&e);
622 cout <<
"Error: " << e.what() <<
" of '" << MO->get_option_name() <<
"' option." << endl;
625 cout <<
"Error: " << e.what() << endl;
634 if (conf.HasVersion())
647 setenv(
"DIM_DNS_NODE", conf.Get<
string>(
"dns").c_str(), 1);
652 if (!conf.Has(
"console"))
654 if (conf.Get<
bool>(
"no-dim"))
655 return RunDim<StateMachine>(conf);
657 return RunDim<StateMachineDim>(conf);
660 if (conf.Get<
bool>(
"no-dim"))
662 if (conf.Get<
int>(
"console")==0)
663 return RunShell<LocalShell, StateMachine>(conf);
665 return RunShell<LocalConsole, StateMachine>(conf);
669 if (conf.Get<
int>(
"console")==0)
670 return RunShell<LocalShell, StateMachineDim>(conf);
672 return RunShell<LocalConsole, StateMachineDim>(conf);
675 catch (std::exception& e)
677 std::cerr <<
"Exception: " << e.what() <<
"\n";
void PrintVersion(const char *name)
Commandline parsing, resource file parsing and database access.
void SetupConfiguration(Configuration &conf)