FairMQ: Implement config API for string subscriptions

This API auto converts property values to strings and allows a more
convenient one catches all subscription.
This commit is contained in:
Dennis Klein
2017-11-16 17:50:36 +01:00
committed by Mohammad Al-Turany
parent 80332583ee
commit 378c47c5e5
3 changed files with 37 additions and 0 deletions

View File

@@ -95,6 +95,8 @@ class Plugin
auto SubscribeToPropertyChange(std::function<void(const std::string& key, T newValue)> callback) -> void { fPluginServices->SubscribeToPropertyChange<T>(fkName, callback); }
template<typename T>
auto UnsubscribeFromPropertyChange() -> void { fPluginServices->UnsubscribeFromPropertyChange<T>(fkName); }
auto SubscribeToPropertyChangeAsString(std::function<void(const std::string& key, std::string newValue)> callback) -> void { fPluginServices->SubscribeToPropertyChangeAsString(fkName, callback); }
auto UnsubscribeFromPropertyChangeAsString() -> void { fPluginServices->UnsubscribeFromPropertyChangeAsString(fkName); }
private:
const std::string fkName;