Add SetProperties()

This commit is contained in:
Alexey Rybalchenko
2019-05-16 14:10:36 +02:00
committed by Dennis Klein
parent fe241fe9ee
commit 29313bbec3
2 changed files with 8 additions and 2 deletions

View File

@@ -140,6 +140,14 @@ class FairMQProgOptions
return 0;
}
void SetProperties(const std::map<std::string, boost::any>& input)
{
std::map<std::string, boost::program_options::variable_value>& vm = fVarMap;
for (const auto& m : input) {
vm[m.first].value() = m.second;
}
}
template <typename T>
void Subscribe(const std::string& subscriber, std::function<void(typename fair::mq::PropertyChange::KeyType, T)> func)
{