6 #ifndef OPENMPCD_IMPLEMENTATIONDETAILS_CONFIGURATION_SETTING_HPP
7 #define OPENMPCD_IMPLEMENTATIONDETAILS_CONFIGURATION_SETTING_HPP
11 #include <libconfig.h++>
18 namespace ImplementationDetails
23 namespace Configuration
42 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const bool value)
44 throwIfNameInUse(*parent, name);
46 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeBoolean);
57 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const int value)
59 throwIfNameInUse(*parent, name);
61 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeInt);
72 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const long long value)
74 throwIfNameInUse(*parent, name);
76 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeInt64);
87 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const double value)
89 throwIfNameInUse(*parent, name);
91 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeFloat);
102 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const std::string& value)
104 throwIfNameInUse(*parent, name);
106 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeString);
117 static void createSetting(libconfig::Setting*
const parent,
const std::string& name,
const char*
const value)
119 throwIfNameInUse(*parent, name);
121 libconfig::Setting& setting = parent->add(name, libconfig::Setting::TypeString);
132 static void throwIfNameInUse(
const libconfig::Setting& parent,
const std::string& name)
134 if(parent.exists(name))