Mantid
|
The ConfigObserver is used to observe changes to the value of a single configuration property based on notifications sent from the ConfigService. More...
#include <ConfigPropertyObserver.h>
Public Member Functions | |
ConfigPropertyObserver (std::string propertyName) | |
Begins listening for change notifications from the global ConfigService concerning the property with the specified name. More... | |
virtual | ~ConfigPropertyObserver ()=default |
Protected Member Functions | |
virtual void | onPropertyValueChanged (const std::string &newValue, const std::string &prevValue)=0 |
void | onValueChanged (const std::string &name, const std::string &newValue, const std::string &prevValue) override |
Filters out change notifications concerning other properties. More... | |
Private Attributes | |
std::string | m_propertyName |
Additional Inherited Members | |
Private Member Functions inherited from Mantid::Kernel::ConfigObserver | |
ConfigObserver () | |
Begins listening to notifications from the global ConfigService. More... | |
ConfigObserver (const ConfigObserver &other) | |
Copying a config observer is the same as default constructing one. More... | |
void | notifyValueChanged (ConfigValChangeNotification_ptr notification) |
Called when a config property's value is changed. More... | |
void | notifyValueChanged (const std::string &name, const std::string &newValue, const std::string &prevValue) |
Called when a config property's value is changed. More... | |
ConfigObserver & | operator= (const ConfigObserver &other) |
Nothing to do but we must overload the = operator to prevent a default copy which would produce incorrect results. More... | |
virtual | ~ConfigObserver () noexcept |
virtual void | onValueChanged (const std::string &name, const std::string &newValue, const std::string &prevValue)=0 |
The ConfigObserver is used to observe changes to the value of a single configuration property based on notifications sent from the ConfigService.
Definition at line 17 of file ConfigPropertyObserver.h.
Mantid::Kernel::ConfigPropertyObserver::ConfigPropertyObserver | ( | std::string | propertyName | ) |
Begins listening for change notifications from the global ConfigService concerning the property with the specified name.
Definition at line 16 of file ConfigPropertyObserver.cpp.
|
virtualdefault |
|
protectedpure virtual |
Implemented in ConfigPropertyObserverWrapper.
Referenced by onValueChanged().
|
overrideprotectedvirtual |
Filters out change notifications concerning other properties.
Implements Mantid::Kernel::ConfigObserver.
Definition at line 21 of file ConfigPropertyObserver.cpp.
References m_propertyName, and onPropertyValueChanged().
|
private |
Definition at line 28 of file ConfigPropertyObserver.h.
Referenced by onValueChanged().