|
@@ -323,35 +323,35 @@ void IniParser::SetValue(const string& key, const string& value, const string& s
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-bool IniParser::Get(const string& key, const string& section, bool defvalue) {
|
|
|
|
|
|
|
+HV_EXPORT bool IniParser::Get(const string& key, const string& section, bool defvalue) {
|
|
|
string str = GetValue(key, section);
|
|
string str = GetValue(key, section);
|
|
|
return str.empty() ? defvalue : getboolean(str.c_str());
|
|
return str.empty() ? defvalue : getboolean(str.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-int IniParser::Get(const string& key, const string& section, int defvalue) {
|
|
|
|
|
|
|
+HV_EXPORT int IniParser::Get(const string& key, const string& section, int defvalue) {
|
|
|
string str = GetValue(key, section);
|
|
string str = GetValue(key, section);
|
|
|
return str.empty() ? defvalue : atoi(str.c_str());
|
|
return str.empty() ? defvalue : atoi(str.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-float IniParser::Get(const string& key, const string& section, float defvalue) {
|
|
|
|
|
|
|
+HV_EXPORT float IniParser::Get(const string& key, const string& section, float defvalue) {
|
|
|
string str = GetValue(key, section);
|
|
string str = GetValue(key, section);
|
|
|
return str.empty() ? defvalue : atof(str.c_str());
|
|
return str.empty() ? defvalue : atof(str.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-void IniParser::Set(const string& key, const bool& value, const string& section) {
|
|
|
|
|
|
|
+HV_EXPORT void IniParser::Set(const string& key, const bool& value, const string& section) {
|
|
|
SetValue(key, value ? "true" : "false", section);
|
|
SetValue(key, value ? "true" : "false", section);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-void IniParser::Set(const string& key, const int& value, const string& section) {
|
|
|
|
|
|
|
+HV_EXPORT void IniParser::Set(const string& key, const int& value, const string& section) {
|
|
|
SetValue(key, asprintf("%d", value), section);
|
|
SetValue(key, asprintf("%d", value), section);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
template<>
|
|
template<>
|
|
|
-void IniParser::Set(const string& key, const float& value, const string& section) {
|
|
|
|
|
|
|
+HV_EXPORT void IniParser::Set(const string& key, const float& value, const string& section) {
|
|
|
SetValue(key, asprintf("%f", value), section);
|
|
SetValue(key, asprintf("%f", value), section);
|
|
|
}
|
|
}
|
|
|
|
|
|