add keys()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user