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:
vanhofen
2023-01-31 23:30:14 +01:00
parent 90cf2404aa
commit 0a5591bbc0
2 changed files with 108 additions and 101 deletions

View File

@@ -34,79 +34,79 @@ typedef std::map<std::string, std::string> ConfigDataMap;
class CConfigFile
{
private:
private:
ConfigDataMap configData;
char delimiter;
bool saveDefaults;
bool modifiedFlag;
bool unknownKeyQueryedFlag;
ConfigDataMap configData;
char delimiter;
bool saveDefaults;
bool modifiedFlag;
bool unknownKeyQueryedFlag;
void storeBool(const std::string & key, const bool val);
void storeInt32(const std::string & key, const int32_t val);
void storeInt64(const std::string & key, const int64_t val);
void storeString(const std::string & key, const std::string & val);
void storeBool(const std::string &key, const bool val);
void storeInt32(const std::string &key, const int32_t val);
void storeInt64(const std::string &key, const int64_t val);
void storeString(const std::string &key, const std::string &val);
public:
CConfigFile(const char p_delimiter, const bool p_saveDefaults = true);
public:
CConfigFile(const char p_delimiter, const bool p_saveDefaults = true);
bool loadConfig(const char * const filename, char _delimiter = '=');
bool loadConfig(const std::string & filename, char _delimiter = '=');
bool loadConfig(const char *const filename, char _delimiter = '=');
bool loadConfig(const std::string &filename, char _delimiter = '=');
bool saveConfig(const char * const filename, char _delimiter = '=');
bool saveConfig(const std::string & filename, char _delimiter = '=');
bool saveConfig(const char *const filename, char _delimiter = '=');
bool saveConfig(const std::string &filename, char _delimiter = '=');
void clear();
void clear();
//
// strings
//
std::string getString(const char * const 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 std::string & key, const std::string & val);
//
// strings
//
std::string getString(const char *const 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 std::string &key, const std::string &val);
//
// 32, 64 bit int
//
int32_t getInt32(const char * const 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 std::string & key, const int32_t val);
//
// 32, 64 bit int
//
int32_t getInt32(const char *const 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 std::string &key, const int32_t val);
int64_t getInt64(const char * const 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 std::string & key, const int64_t val);
int64_t getInt64(const char *const 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 std::string &key, const int64_t val);
//
// boolean
//
bool getBool(const char * const 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 std::string & key, const bool val);
//
// boolean
//
bool getBool(const char *const 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 std::string &key, const bool val);
//
// vectors
//
std::vector <std::string> getStringVector(const std::string & key);
void setStringVector(const std::string & key, const std::vector<std::string> &vec);
//
// vectors
//
std::vector <std::string> getStringVector(const std::string &key);
void setStringVector(const std::string &key, const std::vector<std::string> &vec);
std::vector <int32_t> getInt32Vector(const std::string & key);
void setInt32Vector(const std::string & key, const std::vector<int32_t> &vec);
std::vector <int32_t> getInt32Vector(const std::string &key);
void setInt32Vector(const std::string &key, const std::vector<int32_t> &vec);
//
// flags
//
bool getModifiedFlag() const { return modifiedFlag; }
void setModifiedFlag(const bool val) { modifiedFlag = val; }
//
// flags
//
bool getModifiedFlag() const { return modifiedFlag; }
void setModifiedFlag(const bool val) { modifiedFlag = val; }
bool getUnknownKeyQueryedFlag() const { return unknownKeyQueryedFlag; }
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
bool getUnknownKeyQueryedFlag() const { return unknownKeyQueryedFlag; }
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
ConfigDataMap getConfigDataMap(){ return configData; }
bool deleteKey(const std::string & key);
ConfigDataMap getConfigDataMap() { return configData; }
bool deleteKey(const std::string &key);
};
#endif /* __configfile_h__ */