diff --git a/src/lib/ebus/stringhelper.cpp b/src/lib/ebus/stringhelper.cpp index 6ca6163e..cfc86cc9 100644 --- a/src/lib/ebus/stringhelper.cpp +++ b/src/lib/ebus/stringhelper.cpp @@ -521,4 +521,15 @@ void StringReplacers::reduce(bool compress) { } while (reduced); } +vector StringReplacers::keys() const { + vector 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 diff --git a/src/lib/ebus/stringhelper.h b/src/lib/ebus/stringhelper.h index 447c33ef..57938967 100644 --- a/src/lib/ebus/stringhelper.h +++ b/src/lib/ebus/stringhelper.h @@ -263,6 +263,12 @@ class StringReplacers { */ void reduce(bool compress = false); + /** + * Get all set keys. + * @return the set keys. + */ + vector keys() const; + private: /** constant values from the integration file. */ map m_constants;