add keys()

This commit is contained in:
John
2022-04-30 15:38:05 +02:00
parent ea5337fdaa
commit da52dc2eba
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -521,4 +521,15 @@ void StringReplacers::reduce(bool compress) {
} while (reduced);
}
vector<string> StringReplacers::keys() const {
vector<string> ret;
for (auto& it : m_constants) {
ret.push_back(it.first);
}
for (auto& it : m_replacers) {
ret.push_back(it.first);
}
return ret;
}
} // namespace ebusd
+6
View File
@@ -263,6 +263,12 @@ class StringReplacers {
*/
void reduce(bool compress = false);
/**
* Get all set keys.
* @return the set keys.
*/
vector<string> keys() const;
private:
/** constant values from the integration file. */
map<string, string> m_constants;