MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / enumerate

Method enumerate

base/poco/Util/src/IniFileConfiguration.cpp:99–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99void 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
125void IniFileConfiguration::removeRaw(const std::string& key)

Callers

nothing calls this directly

Calls 8

icompareFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected