Mantid
Loading...
Searching...
No Matches
AnalysisDataServiceObserverAdapter.cpp
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 +
10
12
15
17 try {
18 return callMethod<void>(getSelf(), "anyChangeHandle");
19 } catch (UndefinedAttributeError &) {
20 return;
21 }
22}
23
24void AnalysisDataServiceObserverAdapter::addHandle(const std::string &wsName, const Workspace_sptr &ws) {
25 try {
26 return callMethod<void>(getSelf(), "addHandle", wsName, ws);
27 } catch (UndefinedAttributeError &) {
28 return;
29 }
30}
31
32void AnalysisDataServiceObserverAdapter::replaceHandle(const std::string &wsName, const Workspace_sptr &ws) {
33 try {
34 return callMethod<void>(getSelf(), "replaceHandle", wsName, ws);
35 } catch (UndefinedAttributeError &) {
36 return;
37 }
38}
39
40void AnalysisDataServiceObserverAdapter::deleteHandle(const std::string &wsName, const Workspace_sptr &ws) {
41 try {
42 return callMethod<void>(getSelf(), "deleteHandle", wsName, ws);
43 } catch (UndefinedAttributeError &) {
44 return;
45 }
46}
47
49 try {
50 return callMethod<void>(getSelf(), "clearHandle");
51 } catch (UndefinedAttributeError &) {
52 return;
53 }
54}
55
56void AnalysisDataServiceObserverAdapter::renameHandle(const std::string &wsName, const std::string &newName) {
57 try {
58 return callMethod<void>(getSelf(), "renameHandle", wsName, newName);
59 } catch (UndefinedAttributeError &) {
60 return;
61 }
62}
63
64void AnalysisDataServiceObserverAdapter::groupHandle(const std::string &wsName, const Workspace_sptr &ws) {
65 try {
66 return callMethod<void>(getSelf(), "groupHandle", wsName, ws);
67 } catch (UndefinedAttributeError &) {
68 return;
69 }
70}
71
72void AnalysisDataServiceObserverAdapter::unGroupHandle(const std::string &wsName, const Workspace_sptr &ws) {
73 try {
74 return callMethod<void>(getSelf(), "unGroupHandle", wsName, ws);
75 } catch (UndefinedAttributeError &) {
76 return;
77 }
78}
79
81 try {
82 return callMethod<void>(getSelf(), "groupUpdateHandle", wsName, ws);
83 } catch (UndefinedAttributeError &) {
84 return;
85 }
86}
87
88} // namespace Mantid::PythonInterface
std::unique_ptr< ConceptT > m_self
void clearHandle() override
If the ADS is cleared, then this function will trigger, works by overloading this class and overridin...
void renameHandle(const std::string &wsName, const std::string &newName) override
If a workspace is renamed in the ADS, then this function will trigger, works by overloading this clas...
void deleteHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a workspace is deleted from the ADS, then this function will trigger, works by overloading this cl...
void groupUpdateHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a group has a workspace added/removed in the ADS, then this function will trigger,...
void groupHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a group is created/added to the ADS, then this function will trigger, works by overloading this cl...
void replaceHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a workspace is replaced in the ADS, then this function will trigger, works by overloading this cla...
void anyChangeHandle() override
If anyChange to the ADS occurs then this function will trigger, works by overloading this class and o...
PyObject * getSelf() const
Return the PyObject that owns this wrapper, i.e. self.
void unGroupHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a group is removed from the ADS, then this function will trigger, works by overloading this class ...
void addHandle(const std::string &wsName, const Workspace_sptr &ws) override
If a workspace is added to the ADS, then this function will trigger, works by overloading this class ...
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
Defines an exception for an undefined attribute.
Definition: CallMethod.h:20