Mantid
Loading...
Searching...
No Matches
ConfigObserver.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 "ConfigService.h"
9#include "MantidKernel/DllConfig.h"
10#include "Poco/NObserver.h"
11
12namespace Mantid {
13namespace Kernel {
17class MANTID_KERNEL_DLL ConfigObserver {
18public:
20 ConfigObserver(const ConfigObserver &other);
21 ConfigObserver &operator=(const ConfigObserver &other);
22 virtual ~ConfigObserver() noexcept;
23
24 void notifyValueChanged(const std::string &name, const std::string &newValue, const std::string &prevValue);
25 void notifyValueChanged(ConfigValChangeNotification_ptr notification);
26
27protected:
28 virtual void onValueChanged(const std::string &name, const std::string &newValue, const std::string &prevValue) = 0;
29
30private:
32};
33} // namespace Kernel
34} // namespace Mantid
The ConfigObserver is used to observe changes in the configuration based on notifications sent from t...
virtual void onValueChanged(const std::string &name, const std::string &newValue, const std::string &prevValue)=0
Poco::NObserver< ConfigObserver, Mantid::Kernel::ConfigValChangeNotification > m_valueChangeListener
const Poco::AutoPtr< Mantid::Kernel::ConfigServiceImpl::ValueChanged > & ConfigValChangeNotification_ptr
Helper class which provides the Collimation Length for SANS instruments.