19 auto GetPath() const -> std::
string {
return m_sPath; }
23 auto GetError() const -> const std::
string& {
return m_sError; }
25 auto ReadFile(
const std::string& sPath) -> bool;
27 auto WriteFile(
const std::string& sPath)
const -> bool;
31 auto GetValue(
const std::string& sKey,
32 const std::string& sValueName,
33 T& value)
const ->
bool
35 const XNode* pNode = GetChild(sKey);
38 return pNode->GetAttrValue<T>(sValueName, value);
41 void SetValue(
const std::string& sKey,
42 const std::string& sValueName,
45 XNode* pNode = GetChild(sKey);
47 pNode = AppendChild(sKey);
48 pNode->AppendAttr<T>(sValueName, value);
51 void SetKeyValue(
XNode* keynode,
52 const std::string& sValueName,
55 keynode->AppendAttr<T>(sValueName, value);
58 auto DeleteKey(
const std::string& keyname) -> bool;
59 auto DeleteValue(
const std::string& keyname,
const std::string& valuename)
71 auto RenameKey(
const std::string& from,
const std::string& to) -> bool;
76 mutable std::string m_sError;
The functions to read and write .INI files.
Definition IniFile.h:11
auto GetPath() const -> std::string
Retrieve the filename of the last file loaded.
Definition IniFile.h:19
auto GetError() const -> const std::string &
Retrieve any errors that have occurred.
Definition IniFile.h:23
auto RenameKey(const std::string &from, const std::string &to) -> bool
Rename a key.
Definition IniFile.cpp:178
IniFile()
Set up an INI file with the defaults.
Definition IniFile.cpp:13
Definition RageFileBasic.h:10