diff --git a/src/variables/variable.h b/src/variables/variable.h index 09dff6b8..d3ad71a2 100644 --- a/src/variables/variable.h +++ b/src/variables/variable.h @@ -610,6 +610,7 @@ class Variables : public std::vector { return std::find_if(begin(), end(), [v](Variable *m) -> bool { return *v == *m; }) != end(); }; + bool contains(const VariableValue *v) { return std::find_if(begin(), end(), [v](Variable *m) -> bool { @@ -620,6 +621,19 @@ class Variables : public std::vector { return v->getKeyWithCollection() == *m->m_fullName.get(); }) != end(); }; + + + std::string getVariableNames(const std::string &sep = ",") { + std::string names; + for (auto a : *this) { + if (names.length() > 0) { + names = names + sep + *a->m_fullName; + } else { + names = *a->m_fullName; + } + } + return names; + } };