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 <boost/python/wrapper.hpp>
11
12namespace Mantid {
13namespace PythonInterface {
14
23public:
24 explicit AnalysisDataServiceObserverAdapter(PyObject *self);
27
28 void anyChangeHandle() override;
29 void addHandle(const std::string &wsName, const Workspace_sptr &ws) override;
30 void replaceHandle(const std::string &wsName, const Workspace_sptr &ws) override;
31 void deleteHandle(const std::string &wsName, const Workspace_sptr &ws) override;
32 void clearHandle() override;
33 void renameHandle(const std::string &wsName, const std::string &newName) override;
34 void groupHandle(const std::string &wsName, const Workspace_sptr &ws) override;
35 void unGroupHandle(const std::string &wsName, const Workspace_sptr &ws) override;
36 void groupUpdateHandle(const std::string &wsName, const Workspace_sptr &ws) override;
37
38private:
40 inline PyObject *getSelf() const { return m_self; }
42 PyObject *m_self;
43};
44
45} // namespace PythonInterface
46} // namespace Mantid
std::unique_ptr< ConceptT > m_self
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
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
Definition: Workspace_fwd.h:20
Helper class which provides the Collimation Length for SANS instruments.