| 97 | |
| 98 | |
| 99 | void IniFileConfiguration::enumerate(const std::string& key, Keys& range) const |
| 100 | { |
| 101 | std::set<std::string> keys; |
| 102 | std::string prefix = key; |
| 103 | if (!prefix.empty()) prefix += '.'; |
| 104 | std::string::size_type psize = prefix.size(); |
| 105 | for (IStringMap::const_iterator it = _map.begin(); it != _map.end(); ++it) |
| 106 | { |
| 107 | if (icompare(it->first, psize, prefix) == 0) |
| 108 | { |
| 109 | std::string subKey; |
| 110 | std::string::size_type end = it->first.find('.', psize); |
| 111 | if (end == std::string::npos) |
| 112 | subKey = it->first.substr(psize); |
| 113 | else |
| 114 | subKey = it->first.substr(psize, end - psize); |
| 115 | if (keys.find(subKey) == keys.end()) |
| 116 | { |
| 117 | range.push_back(subKey); |
| 118 | keys.insert(subKey); |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | |
| 125 | void IniFileConfiguration::removeRaw(const std::string& key) |