13#include <boost/program_options.hpp>
20ConfiguredModule::map ConfiguredModule::configuredModules;
25 std::string defaultStr =
"+++DEFAULT+++";
27 boost::program_options::options_description opt;
29 for (
auto entry : configuredModules) {
30 std::string module = entry.first;
31 opt.add_options()(
addPrefix(module).c_str(),
32 boost::program_options::value<std::string>()->default_value(defaultStr),
33 (
"Load an implementation of " + module).c_str());
38 for (
auto entry : configuredModules) {
39 std::string implString = vm[
addPrefix(entry.first)].as<std::string>();
41 if (implString != defaultStr) {
42 entry.second.first(implString);
55 configuredModules.merge(newMap);
60 configuredModules[mod] = { setter, getter };
65 return configuredModules[module].second();
71 for (
auto entry : configuredModules) {
72 iiMap[
addPrefix(entry.first)] = entry.second.second();
static boost::program_options::variables_map parse(const boost::program_options::options_description &opt)
Parses all configuration sources.