Mantid
Loading...
Searching...
No Matches
AnalysisDataServiceObserverAdapter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 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
10#include "MantidPythonInterface/api/DllConfig.h"
11#include <boost/python/wrapper.hpp>
12
13namespace Mantid {
14namespace PythonInterface {
15
24public:
25 explicit AnalysisDataServiceObserverAdapter(PyObject *self);
28
29 void anyChangeHandle() override;
30 void addHandle(const std::string &wsName, const Workspace_sptr &ws) override;
31 void replaceHandle(const std::string &wsName, const Workspace_sptr &ws) override;
32 void deleteHandle(const std::string &wsName, const Workspace_sptr &ws) override;
33 void clearHandle() override;
34 void renameHandle(const std::string &wsName, const std::string &newName) override;
35 void groupHandle(const std::string &wsName, const Workspace_sptr &ws) override;
36 void unGroupHandle(const std::string &wsName, const Workspace_sptr &ws) override;
37 void groupUpdateHandle(const std::string &wsName, const Workspace_sptr &ws) override;
38
39private:
41 inline PyObject *getSelf() const { return m_self; }
43 PyObject *m_self;
44};
45
46} // namespace PythonInterface
47} // namespace Mantid
std::unique_ptr< ConceptT > m_self
A wrapper class helping to export AnalysisDataServiceObserver to python.
AnalysisDataServiceObserverAdapter(const AnalysisDataServiceObserverAdapter &)=delete
PyObject * m_self
Value of "self" used by python to refer to an instance of this class.
AnalysisDataServiceObserverAdapter & operator=(const AnalysisDataServiceObserverAdapter &)=delete
PyObject * getSelf() const
Return the PyObject that owns this wrapper, i.e. self.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Helper class which provides the Collimation Length for SANS instruments.