43 int Read(
const std::string& file);
46 bool HasKey(
const std::string& section,
const std::string& key)
const;
49 std::string
GetKey(
const std::string& section,
const std::string& key,
const std::string& defaultValue)
const;
50 int GetKey(
const std::string& section,
const std::string& key,
const int defaultValue)
const;
51 bool GetKey(
const std::string& section,
const std::string& key,
const bool defaultValue)
const;
56 std::vector<std::string>
GetKeys(
const std::string& section)
const;
61 typedef std::map<std::string, std::string>
IniValues;
bool HasKey(const std::string §ion, const std::string &key) const
Checks if given section/key exists.
std::vector< std::string > GetKeys(const std::string §ion) const
returns a vector of all know keys in given section
void PrintValues() const
for debugging purpose, print all values
std::vector< std::string > GetSections() const
returns a vector of all know sections
std::string GetKey(const std::string §ion, const std::string &key, const std::string &defaultValue) const
returns the value of the given section/key or default value if it does not exists ...
std::map< std::string, std::string > IniValues
stores the key/values pairs for each section
int Read(const std::string &file)
Reads the given ini file.
std::map< std::string, IniValues > m_iniValues
map to store the information from different sections
A simple parser for ini files, it implements only some basic features.