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

@ -198,8 +198,6 @@ int FairMQProgOptions::ParseAll(const int argc, char const* const* argv, bool al
{
ParseCmdLine(argc, argv, allowUnregistered);
UpdateVarMap<string>("blubblub", "yarhar");
// if this option is provided, handle them and return stop value
if (fVarMap.count("help")) {
cout << fAllOptions << endl;

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)
{