19#define USING_CONFIG_FILE(fileName) \
20 if (ksf::ksConfig config_file{ksf::ksConfig(fileName)})
42 ksConfig(
const std::string& fileName);
49 void setParam(
const std::string& paramName,
const std::string paramValue);
57 const std::string&
getParam(
const std::string& paramName,
const std::string& defaultValue = std::string())
const;
63 operator bool()
const;
std::map< std::string, std::string > configParams
Config parameters.
Definition ksConfig.h:34
virtual ~ksConfig()
Saves config content on the device filesystem. In case there is no modification, nothing should actua...
Definition ksConfig.cpp:73
const std::string & getParam(const std::string ¶mName, const std::string &defaultValue=std::string()) const
Retrieves parameter value.
Definition ksConfig.cpp:62
std::string configPath
Config filename.
Definition ksConfig.h:35
void setParam(const std::string ¶mName, const std::string paramValue)
Sets parameter value (creates new parameter if it does not exist).
Definition ksConfig.cpp:56
ksConfig(const std::string &fileName)
Constructor tha opens or creates configuration file.
Definition ksConfig.cpp:16
bool isDirty
True if config contents has been modified (and should be saved).
Definition ksConfig.h:33