mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Add SetProperties()
This commit is contained in:
parent
fe241fe9ee
commit
29313bbec3
|
@ -198,8 +198,6 @@ int FairMQProgOptions::ParseAll(const int argc, char const* const* argv, bool al
|
||||||
{
|
{
|
||||||
ParseCmdLine(argc, argv, allowUnregistered);
|
ParseCmdLine(argc, argv, allowUnregistered);
|
||||||
|
|
||||||
UpdateVarMap<string>("blubblub", "yarhar");
|
|
||||||
|
|
||||||
// if this option is provided, handle them and return stop value
|
// if this option is provided, handle them and return stop value
|
||||||
if (fVarMap.count("help")) {
|
if (fVarMap.count("help")) {
|
||||||
cout << fAllOptions << endl;
|
cout << fAllOptions << endl;
|
||||||
|
|
|
@ -140,6 +140,14 @@ class FairMQProgOptions
|
||||||
return 0;
|
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>
|
template <typename T>
|
||||||
void Subscribe(const std::string& subscriber, std::function<void(typename fair::mq::PropertyChange::KeyType, T)> func)
|
void Subscribe(const std::string& subscriber, std::function<void(typename fair::mq::PropertyChange::KeyType, T)> func)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user