146 po::variables_map vm;
149 vm = conf.Parse(argc, argv);
151 catch (std::exception &e)
153 #if BOOST_VERSION > 104000 154 po::multiple_occurrences *MO =
dynamic_cast<po::multiple_occurrences*
>(&e);
156 cout <<
"Error: " << e.what() <<
" of '" << MO->get_option_name() <<
"' option." << endl;
159 cout <<
"Error: " << e.what() << endl;
165 if (conf.HasHelp() || conf.HasPrint())
168 cout <<
"------------------------------" << endl;
170 cout <<
"Program " << argv[0] <<
" started successfully." << endl;
172 cout << conf.Has(
"switch") <<
" " << conf.Get<
bool>(
"switch") << endl;
173 cout << conf.Has(
"bool") <<
" " << conf.Get<
bool>(
"bool") << endl;
void SetupConfiguration(Configuration &conf, int &opt)
Commandline parsing, resource file parsing and database access.