Mantid
Loading...
Searching...
No Matches
ConfigPropertyObserver.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8#include "ConfigObserver.h"
9#include "ConfigService.h"
10#include "MantidKernel/DllConfig.h"
11
12namespace Mantid {
13namespace Kernel {
17class MANTID_KERNEL_DLL ConfigPropertyObserver : ConfigObserver {
18public:
19 ConfigPropertyObserver(std::string propertyName);
20 virtual ~ConfigPropertyObserver() = default;
21
22protected:
23 void onValueChanged(const std::string &name, const std::string &newValue, const std::string &prevValue) override;
24
25 virtual void onPropertyValueChanged(const std::string &newValue, const std::string &prevValue) = 0;
26
27private:
28 std::string m_propertyName;
29};
30} // namespace Kernel
31} // namespace Mantid
The ConfigObserver is used to observe changes in the configuration based on notifications sent from t...
The ConfigObserver is used to observe changes to the value of a single configuration property based o...
virtual void onPropertyValueChanged(const std::string &newValue, const std::string &prevValue)=0
Helper class which provides the Collimation Length for SANS instruments.