10 #ifndef NDSINIFILEPARSERIMPL_H
11 #define NDSINIFILEPARSERIMPL_H
20 class IniFileParserImpl
23 IniFileParserImpl(std::istream& inputStream);
36 const std::string& getString(
const std::string& section,
const std::string& key,
const std::string& defaultValue)
const;
38 bool keyExists(
const std::string& section,
const std::string& key)
const;
40 typedef std::list<std::string> sectionsList_t;
41 sectionsList_t getSections()
const;
45 typedef std::pair<std::string, std::string> keyValue_t;
47 static std::string trim(
const std::string&
string);
49 static std::string getSection(
const std::string& line);
51 static size_t findFirstUnescapedChar(
const std::string&
string,
const char findChar,
const size_t startPosition = 0);
53 static keyValue_t getKeyValue(
const std::string& line);
55 typedef std::map<std::string, std::string> keyValueMap_t;
56 typedef std::map<std::string, keyValueMap_t> sectionKeyMap_t;
58 sectionKeyMap_t m_sections;
63 #endif // NDSINIFILEPARSERIMPL_H