mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
libconfigfile: formatting code using astyle
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5c7a5ddc5a
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Origin message was:
------------------
- libconfigfile: formatting code using astyle
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -51,7 +51,7 @@ void CConfigFile::clear()
|
|||||||
//
|
//
|
||||||
// public file operation methods
|
// public file operation methods
|
||||||
//
|
//
|
||||||
bool CConfigFile::loadConfig(const char * const filename, char _delimiter)
|
bool CConfigFile::loadConfig(const char *const filename, char _delimiter)
|
||||||
{
|
{
|
||||||
std::ifstream configFile(filename);
|
std::ifstream configFile(filename);
|
||||||
|
|
||||||
@@ -86,12 +86,12 @@ bool CConfigFile::loadConfig(const char * const filename, char _delimiter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::loadConfig(const std::string & filename, char _delimiter)
|
bool CConfigFile::loadConfig(const std::string &filename, char _delimiter)
|
||||||
{
|
{
|
||||||
return loadConfig(filename.c_str(), _delimiter);
|
return loadConfig(filename.c_str(), _delimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::saveConfig(const char * const filename, char _delimiter)
|
bool CConfigFile::saveConfig(const char *const filename, char _delimiter)
|
||||||
{
|
{
|
||||||
std::string tmpname = std::string(filename) + ".tmp";
|
std::string tmpname = std::string(filename) + ".tmp";
|
||||||
unlink(tmpname.c_str());
|
unlink(tmpname.c_str());
|
||||||
@@ -117,13 +117,12 @@ bool CConfigFile::saveConfig(const char * const filename, char _delimiter)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "[ConfigFile] Unable to open file " << tmpname << " for writing: "
|
std::cerr << "[ConfigFile] Unable to open file " << tmpname << " for writing: " << strerror(errno) << std::endl;
|
||||||
<< strerror(errno) << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::saveConfig(const std::string & filename, char _delimiter)
|
bool CConfigFile::saveConfig(const std::string &filename, char _delimiter)
|
||||||
{
|
{
|
||||||
return saveConfig(filename.c_str(), _delimiter);
|
return saveConfig(filename.c_str(), _delimiter);
|
||||||
}
|
}
|
||||||
@@ -132,8 +131,8 @@ bool CConfigFile::saveConfig(const std::string & filename, char _delimiter)
|
|||||||
|
|
||||||
//
|
//
|
||||||
// private "store" methods
|
// private "store" methods
|
||||||
//
|
//
|
||||||
void CConfigFile::storeBool(const std::string & key, const bool val)
|
void CConfigFile::storeBool(const std::string &key, const bool val)
|
||||||
{
|
{
|
||||||
if (val == true)
|
if (val == true)
|
||||||
configData[key] = std::string("true");
|
configData[key] = std::string("true");
|
||||||
@@ -141,21 +140,21 @@ void CConfigFile::storeBool(const std::string & key, const bool val)
|
|||||||
configData[key] = std::string("false");
|
configData[key] = std::string("false");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::storeInt32(const std::string & key, const int32_t val)
|
void CConfigFile::storeInt32(const std::string &key, const int32_t val)
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
s << val;
|
s << val;
|
||||||
s >> configData[key];
|
s >> configData[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::storeInt64(const std::string & key, const int64_t val)
|
void CConfigFile::storeInt64(const std::string &key, const int64_t val)
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
s << val;
|
s << val;
|
||||||
s >> configData[key];
|
s >> configData[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::storeString(const std::string & key, const std::string & val)
|
void CConfigFile::storeString(const std::string &key, const std::string &val)
|
||||||
{
|
{
|
||||||
configData[key] = val;
|
configData[key] = val;
|
||||||
}
|
}
|
||||||
@@ -165,20 +164,22 @@ void CConfigFile::storeString(const std::string & key, const std::string & val)
|
|||||||
//
|
//
|
||||||
// public "get" methods
|
// public "get" methods
|
||||||
//
|
//
|
||||||
bool CConfigFile::getBool(const char * const key, const bool defaultVal)
|
bool CConfigFile::getBool(const char *const key, const bool defaultVal)
|
||||||
{
|
{
|
||||||
return getBool(std::string(key), defaultVal);
|
return getBool(std::string(key), defaultVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::getBool(const std::string & key, const bool defaultVal)
|
bool CConfigFile::getBool(const std::string &key, const bool defaultVal)
|
||||||
{
|
{
|
||||||
if (configData.find(key) == configData.end())
|
if (configData.find(key) == configData.end())
|
||||||
{
|
{
|
||||||
if (saveDefaults) {
|
if (saveDefaults)
|
||||||
|
{
|
||||||
unknownKeyQueryedFlag = true;
|
unknownKeyQueryedFlag = true;
|
||||||
storeBool(key, defaultVal);
|
storeBool(key, defaultVal);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return defaultVal;
|
return defaultVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,20 +187,22 @@ bool CConfigFile::getBool(const std::string & key, const bool defaultVal)
|
|||||||
return !((configData[key] == "false") || (configData[key] == "0"));
|
return !((configData[key] == "false") || (configData[key] == "0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CConfigFile::getInt32(const char * const key, const int32_t defaultVal)
|
int32_t CConfigFile::getInt32(const char *const key, const int32_t defaultVal)
|
||||||
{
|
{
|
||||||
return getInt32(std::string(key), defaultVal);
|
return getInt32(std::string(key), defaultVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CConfigFile::getInt32(const std::string & key, const int32_t defaultVal)
|
int32_t CConfigFile::getInt32(const std::string &key, const int32_t defaultVal)
|
||||||
{
|
{
|
||||||
if (configData.find(key) == configData.end())
|
if (configData.find(key) == configData.end())
|
||||||
{
|
{
|
||||||
if (saveDefaults) {
|
if (saveDefaults)
|
||||||
|
{
|
||||||
unknownKeyQueryedFlag = true;
|
unknownKeyQueryedFlag = true;
|
||||||
storeInt32(key, defaultVal);
|
storeInt32(key, defaultVal);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return defaultVal;
|
return defaultVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,20 +214,22 @@ int32_t CConfigFile::getInt32(const std::string & key, const int32_t defaultVal)
|
|||||||
return atoi(configData[key].c_str());
|
return atoi(configData[key].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t CConfigFile::getInt64(const char * const key, const int64_t defaultVal)
|
int64_t CConfigFile::getInt64(const char *const key, const int64_t defaultVal)
|
||||||
{
|
{
|
||||||
return getInt64(std::string(key), defaultVal);
|
return getInt64(std::string(key), defaultVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t CConfigFile::getInt64(const std::string & key, const int64_t defaultVal)
|
int64_t CConfigFile::getInt64(const std::string &key, const int64_t defaultVal)
|
||||||
{
|
{
|
||||||
if (configData.find(key) == configData.end())
|
if (configData.find(key) == configData.end())
|
||||||
{
|
{
|
||||||
if (saveDefaults) {
|
if (saveDefaults)
|
||||||
|
{
|
||||||
unknownKeyQueryedFlag = true;
|
unknownKeyQueryedFlag = true;
|
||||||
storeInt64(key, defaultVal);
|
storeInt64(key, defaultVal);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return defaultVal;
|
return defaultVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,20 +241,22 @@ int64_t CConfigFile::getInt64(const std::string & key, const int64_t defaultVal)
|
|||||||
return atoll(configData[key].c_str());
|
return atoll(configData[key].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CConfigFile::getString(const char * const key, const std::string & defaultVal)
|
std::string CConfigFile::getString(const char *const key, const std::string &defaultVal)
|
||||||
{
|
{
|
||||||
return getString(std::string(key), defaultVal);
|
return getString(std::string(key), defaultVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CConfigFile::getString(const std::string & key, const std::string & defaultVal)
|
std::string CConfigFile::getString(const std::string &key, const std::string &defaultVal)
|
||||||
{
|
{
|
||||||
if (configData.find(key) == configData.end())
|
if (configData.find(key) == configData.end())
|
||||||
{
|
{
|
||||||
if (saveDefaults) {
|
if (saveDefaults)
|
||||||
|
{
|
||||||
unknownKeyQueryedFlag = true;
|
unknownKeyQueryedFlag = true;
|
||||||
storeString(key, defaultVal);
|
storeString(key, defaultVal);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return defaultVal;
|
return defaultVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,7 +264,7 @@ std::string CConfigFile::getString(const std::string & key, const std::string &
|
|||||||
return configData[key];
|
return configData[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector <int32_t> CConfigFile::getInt32Vector(const std::string & key)
|
std::vector <int32_t> CConfigFile::getInt32Vector(const std::string &key)
|
||||||
{
|
{
|
||||||
std::string val = configData[key];
|
std::string val = configData[key];
|
||||||
std::vector <int32_t> vec;
|
std::vector <int32_t> vec;
|
||||||
@@ -287,7 +294,7 @@ std::vector <int32_t> CConfigFile::getInt32Vector(const std::string & key)
|
|||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector <std::string> CConfigFile::getStringVector(const std::string & key)
|
std::vector <std::string> CConfigFile::getStringVector(const std::string &key)
|
||||||
{
|
{
|
||||||
std::string val = configData[key];
|
std::string val = configData[key];
|
||||||
std::vector <std::string> vec;
|
std::vector <std::string> vec;
|
||||||
@@ -322,12 +329,12 @@ std::vector <std::string> CConfigFile::getStringVector(const std::string & key)
|
|||||||
//
|
//
|
||||||
// public "set" methods
|
// public "set" methods
|
||||||
//
|
//
|
||||||
void CConfigFile::setBool(const char * const key, const bool val)
|
void CConfigFile::setBool(const char *const key, const bool val)
|
||||||
{
|
{
|
||||||
setBool(std::string(key), val);
|
setBool(std::string(key), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setBool(const std::string & key, const bool val)
|
void CConfigFile::setBool(const std::string &key, const bool val)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
@@ -342,12 +349,12 @@ void CConfigFile::setBool(const std::string & key, const bool val)
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setInt32(const char * const key, int32_t val)
|
void CConfigFile::setInt32(const char *const key, int32_t val)
|
||||||
{
|
{
|
||||||
setInt32(std::string(key), val);
|
setInt32(std::string(key), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setInt32(const std::string & key, int32_t val)
|
void CConfigFile::setInt32(const std::string &key, int32_t val)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
@@ -362,12 +369,12 @@ void CConfigFile::setInt32(const std::string & key, int32_t val)
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setInt64(const char * const key, const int64_t val)
|
void CConfigFile::setInt64(const char *const key, const int64_t val)
|
||||||
{
|
{
|
||||||
setInt64(std::string(key), val);
|
setInt64(std::string(key), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setInt64(const std::string & key, const int64_t val)
|
void CConfigFile::setInt64(const std::string &key, const int64_t val)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
@@ -382,17 +389,17 @@ void CConfigFile::setInt64(const std::string & key, const int64_t val)
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setString(const char * const key, const std::string & val)
|
void CConfigFile::setString(const char *const key, const std::string &val)
|
||||||
{
|
{
|
||||||
setString(std::string(key), val);
|
setString(std::string(key), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setString(const std::string & key, const std::string & val)
|
void CConfigFile::setString(const std::string &key, const std::string &val)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
std::string oldVal = getString(key);
|
std::string oldVal = getString(key);
|
||||||
|
|
||||||
if ((oldVal != val) || (unknownKeyQueryedFlag))
|
if ((oldVal != val) || (unknownKeyQueryedFlag))
|
||||||
{
|
{
|
||||||
modifiedFlag = true;
|
modifiedFlag = true;
|
||||||
@@ -402,14 +409,14 @@ void CConfigFile::setString(const std::string & key, const std::string & val)
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setInt32Vector(const std::string & key, const std::vector<int32_t> &vec)
|
void CConfigFile::setInt32Vector(const std::string &key, const std::vector<int32_t> &vec)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
std::string oldVal = getString(key);
|
std::string oldVal = getString(key);
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
|
|
||||||
for (std::vector<int32_t>::const_iterator it = vec.begin(); ; )
|
for (std::vector<int32_t>::const_iterator it = vec.begin(); ;)
|
||||||
{
|
{
|
||||||
if (it == vec.end())
|
if (it == vec.end())
|
||||||
break;
|
break;
|
||||||
@@ -427,14 +434,14 @@ void CConfigFile::setInt32Vector(const std::string & key, const std::vector<int3
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigFile::setStringVector(const std::string & key, const std::vector<std::string> &vec)
|
void CConfigFile::setStringVector(const std::string &key, const std::vector<std::string> &vec)
|
||||||
{
|
{
|
||||||
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
bool tmpUnknownKeyQueryedFlag = unknownKeyQueryedFlag;
|
||||||
unknownKeyQueryedFlag = false;
|
unknownKeyQueryedFlag = false;
|
||||||
std::string oldVal = getString(key);
|
std::string oldVal = getString(key);
|
||||||
std::string newVal = "";
|
std::string newVal = "";
|
||||||
|
|
||||||
for (std::vector<std::string>::const_iterator it = vec.begin(); ; )
|
for (std::vector<std::string>::const_iterator it = vec.begin(); ;)
|
||||||
{
|
{
|
||||||
if (it == vec.end())
|
if (it == vec.end())
|
||||||
break;
|
break;
|
||||||
@@ -452,7 +459,7 @@ void CConfigFile::setStringVector(const std::string & key, const std::vector<std
|
|||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::deleteKey(const std::string & key)
|
bool CConfigFile::deleteKey(const std::string &key)
|
||||||
{
|
{
|
||||||
bool ret = configData.erase(key) != 0;
|
bool ret = configData.erase(key) != 0;
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@@ -34,79 +34,79 @@ typedef std::map<std::string, std::string> ConfigDataMap;
|
|||||||
|
|
||||||
class CConfigFile
|
class CConfigFile
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ConfigDataMap configData;
|
ConfigDataMap configData;
|
||||||
char delimiter;
|
char delimiter;
|
||||||
bool saveDefaults;
|
bool saveDefaults;
|
||||||
bool modifiedFlag;
|
bool modifiedFlag;
|
||||||
bool unknownKeyQueryedFlag;
|
bool unknownKeyQueryedFlag;
|
||||||
|
|
||||||
void storeBool(const std::string & key, const bool val);
|
void storeBool(const std::string &key, const bool val);
|
||||||
void storeInt32(const std::string & key, const int32_t val);
|
void storeInt32(const std::string &key, const int32_t val);
|
||||||
void storeInt64(const std::string & key, const int64_t val);
|
void storeInt64(const std::string &key, const int64_t val);
|
||||||
void storeString(const std::string & key, const std::string & val);
|
void storeString(const std::string &key, const std::string &val);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CConfigFile(const char p_delimiter, const bool p_saveDefaults = true);
|
CConfigFile(const char p_delimiter, const bool p_saveDefaults = true);
|
||||||
|
|
||||||
bool loadConfig(const char * const filename, char _delimiter = '=');
|
bool loadConfig(const char *const filename, char _delimiter = '=');
|
||||||
bool loadConfig(const std::string & filename, char _delimiter = '=');
|
bool loadConfig(const std::string &filename, char _delimiter = '=');
|
||||||
|
|
||||||
bool saveConfig(const char * const filename, char _delimiter = '=');
|
bool saveConfig(const char *const filename, char _delimiter = '=');
|
||||||
bool saveConfig(const std::string & filename, char _delimiter = '=');
|
bool saveConfig(const std::string &filename, char _delimiter = '=');
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
//
|
//
|
||||||
// strings
|
// strings
|
||||||
//
|
//
|
||||||
std::string getString(const char * const key, const std::string & defaultVal = "");
|
std::string getString(const char *const key, const std::string &defaultVal = "");
|
||||||
std::string getString(const std::string & key, const std::string & defaultVal = "");
|
std::string getString(const std::string &key, const std::string &defaultVal = "");
|
||||||
void setString(const char * const key, const std::string & val);
|
void setString(const char *const key, const std::string &val);
|
||||||
void setString(const std::string & key, const std::string & val);
|
void setString(const std::string &key, const std::string &val);
|
||||||
|
|
||||||
//
|
//
|
||||||
// 32, 64 bit int
|
// 32, 64 bit int
|
||||||
//
|
//
|
||||||
int32_t getInt32(const char * const key, const int32_t defaultVal = 0);
|
int32_t getInt32(const char *const key, const int32_t defaultVal = 0);
|
||||||
int32_t getInt32(const std::string & key, const int32_t defaultVal = 0);
|
int32_t getInt32(const std::string &key, const int32_t defaultVal = 0);
|
||||||
void setInt32(const char * const key, const int32_t val);
|
void setInt32(const char *const key, const int32_t val);
|
||||||
void setInt32(const std::string & key, const int32_t val);
|
void setInt32(const std::string &key, const int32_t val);
|
||||||
|
|
||||||
int64_t getInt64(const char * const key, const int64_t defaultVal = 0);
|
int64_t getInt64(const char *const key, const int64_t defaultVal = 0);
|
||||||
int64_t getInt64(const std::string & key, const int64_t defaultVal = 0);
|
int64_t getInt64(const std::string &key, const int64_t defaultVal = 0);
|
||||||
void setInt64(const char * const key, const int64_t val);
|
void setInt64(const char *const key, const int64_t val);
|
||||||
void setInt64(const std::string & key, const int64_t val);
|
void setInt64(const std::string &key, const int64_t val);
|
||||||
|
|
||||||
//
|
//
|
||||||
// boolean
|
// boolean
|
||||||
//
|
//
|
||||||
bool getBool(const char * const key, const bool defaultVal = false);
|
bool getBool(const char *const key, const bool defaultVal = false);
|
||||||
bool getBool(const std::string & key, const bool defaultVal = false);
|
bool getBool(const std::string &key, const bool defaultVal = false);
|
||||||
void setBool(const char * const key, const bool val);
|
void setBool(const char *const key, const bool val);
|
||||||
void setBool(const std::string & key, const bool val);
|
void setBool(const std::string &key, const bool val);
|
||||||
|
|
||||||
//
|
//
|
||||||
// vectors
|
// vectors
|
||||||
//
|
//
|
||||||
std::vector <std::string> getStringVector(const std::string & key);
|
std::vector <std::string> getStringVector(const std::string &key);
|
||||||
void setStringVector(const std::string & key, const std::vector<std::string> &vec);
|
void setStringVector(const std::string &key, const std::vector<std::string> &vec);
|
||||||
|
|
||||||
std::vector <int32_t> getInt32Vector(const std::string & key);
|
std::vector <int32_t> getInt32Vector(const std::string &key);
|
||||||
void setInt32Vector(const std::string & key, const std::vector<int32_t> &vec);
|
void setInt32Vector(const std::string &key, const std::vector<int32_t> &vec);
|
||||||
|
|
||||||
//
|
//
|
||||||
// flags
|
// flags
|
||||||
//
|
//
|
||||||
bool getModifiedFlag() const { return modifiedFlag; }
|
bool getModifiedFlag() const { return modifiedFlag; }
|
||||||
void setModifiedFlag(const bool val) { modifiedFlag = val; }
|
void setModifiedFlag(const bool val) { modifiedFlag = val; }
|
||||||
|
|
||||||
bool getUnknownKeyQueryedFlag() const { return unknownKeyQueryedFlag; }
|
bool getUnknownKeyQueryedFlag() const { return unknownKeyQueryedFlag; }
|
||||||
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
|
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
|
||||||
|
|
||||||
ConfigDataMap getConfigDataMap(){ return configData; }
|
ConfigDataMap getConfigDataMap() { return configData; }
|
||||||
bool deleteKey(const std::string & key);
|
bool deleteKey(const std::string &key);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __configfile_h__ */
|
#endif /* __configfile_h__ */
|
||||||
|
Reference in New Issue
Block a user