19#define USING_CONFIG_FILE(fileName) \ 
   20    if (ksf::misc::ksConfig config_file{ksf::misc::ksConfig(fileName)}) 
   44            ksConfig(
const std::string& fileName);
 
   57            void setParam(
const std::string& paramName, std::string paramValue);
 
   71            operator bool() 
const;
 
 
Implements low-level configuration file handling.
Definition ksConfig.h:31
 
virtual ~ksConfig()
Saves config content on the device filesystem. In case there is no modification, nothing should actua...
Definition ksConfig.cpp:81
 
void setParam(const std::string ¶mName, std::string paramValue)
Sets parameter value (creates new parameter if it does not exist).
Definition ksConfig.cpp:98
 
const std::string & getParam(const std::string ¶mName, const std::string &defaultValue=ksConfig::emptyString) const
Retrieves parameter value.
Definition ksConfig.cpp:104
 
std::string configPath
Config filename.
Definition ksConfig.h:35
 
std::map< std::string, std::string > configParams
Config parameters.
Definition ksConfig.h:34
 
static const std::string emptyString
Static empty string for use as default parameter.
Definition ksConfig.h:38
 
ksConfig(const std::string &fileName)
Constructor that opens or creates configuration file.
Definition ksConfig.cpp:20
 
bool isDirty
True if config contents has been modified (and should be saved).
Definition ksConfig.h:33