Mantid
|
A wrapper class helping to export AnalysisDataServiceObserver to python. More...
#include <AnalysisDataServiceObserverAdapter.h>
Public Member Functions | |
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 and overriding this function. More... | |
AnalysisDataServiceObserverAdapter (const AnalysisDataServiceObserverAdapter &)=delete | |
AnalysisDataServiceObserverAdapter (PyObject *self) | |
void | anyChangeHandle () override |
If anyChange to the ADS occurs then this function will trigger, works by overloading this class and overriding this function. More... | |
void | clearHandle () override |
If the ADS is cleared, then this function will trigger, works by overloading this class and overriding this function. More... | |
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 class and overriding this function. More... | |
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 class and overriding this function. More... | |
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, works by overloading this class and overriding this function. More... | |
AnalysisDataServiceObserverAdapter & | operator= (const AnalysisDataServiceObserverAdapter &)=delete |
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 class and overriding this function. More... | |
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 class and overriding this function. More... | |
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 and overriding this function. More... | |
Public Member Functions inherited from Mantid::API::AnalysisDataServiceObserver | |
virtual void | addHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a workspace is added to the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
AnalysisDataServiceObserver () | |
virtual void | anyChangeHandle () |
If anyChange to the ADS occurs then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | clearHandle () |
If the ADS is cleared, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | deleteHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a workspace is deleted from the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | groupHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a group is created/added to the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | groupUpdateHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a group has a workspace added/removed in the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
void | observeAdd (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a workspace is added to it. More... | |
void | observeAll (bool turnOn=true) |
Function will turn on/off all observers for the ADS. More... | |
void | observeClear (bool turnOn=true) |
Function will add/remove the observer to the ADS for when the ADS is cleared. More... | |
void | observeDelete (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a workspace is deleted. More... | |
void | observeGroup (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a group is added/created in the ADS. More... | |
void | observeGroupUpdate (bool turnOn=true) |
Function will add/remove the observer to the ADS for if a workspace is added to a group or removed. More... | |
void | observeRename (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a workspace is renamed. More... | |
void | observeReplace (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a workspace is replaced. More... | |
void | observeUnGroup (bool turnOn=true) |
Function will add/remove the observer to the ADS for when a group is removed/delete from the ADS. More... | |
virtual void | renameHandle (const std::string &wsName, const std::string &newName) |
If a workspace is renamed in the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | replaceHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a workspace is replaced in the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual void | unGroupHandle (const std::string &wsName, const Workspace_sptr &ws) |
If a group is removed from the ADS, then this function will trigger, works by overloading this class and overriding this function. More... | |
virtual | ~AnalysisDataServiceObserver () |
Private Member Functions | |
PyObject * | getSelf () const |
Return the PyObject that owns this wrapper, i.e. self. More... | |
Private Attributes | |
PyObject * | m_self |
Value of "self" used by python to refer to an instance of this class. More... | |
A wrapper class helping to export AnalysisDataServiceObserver to python.
It provides access from the C++ side to methods defined in python on subclasses of AnalysisDataServiceObserver. This allows the virtual methods to be overriden by python subclasses.
Definition at line 22 of file AnalysisDataServiceObserverAdapter.h.
|
explicit |
Definition at line 13 of file AnalysisDataServiceObserverAdapter.cpp.
|
delete |
|
overridevirtual |
If a workspace is added to the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace added |
ws | Workspace_sptr; the Workspace that is added |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 24 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If anyChange to the ADS occurs then this function will trigger, works by overloading this class and overriding this function.
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 16 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If the ADS is cleared, then this function will trigger, works by overloading this class and overriding this function.
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 48 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If a workspace is deleted from the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace |
ws | Workspace_sptr; the Workspace that is deleted |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 40 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
inlineprivate |
Return the PyObject that owns this wrapper, i.e. self.
Definition at line 40 of file AnalysisDataServiceObserverAdapter.h.
References m_self.
Referenced by addHandle(), anyChangeHandle(), clearHandle(), deleteHandle(), groupHandle(), groupUpdateHandle(), renameHandle(), replaceHandle(), and unGroupHandle().
|
overridevirtual |
If a group is created/added to the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace |
ws | Workspace_sptr; the WorkspaceGroup that was added/created |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 64 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If a group has a workspace added/removed in the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace |
ws | Workspace_sptr; the WorkspaceGroup that was updated |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 80 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
delete |
|
overridevirtual |
If a workspace is renamed in the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace |
newName | std::string; the new name of the workspace |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 56 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If a workspace is replaced in the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace replacing |
ws | Workspace_sptr; the Workspace that is replacing |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 32 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
overridevirtual |
If a group is removed from the ADS, then this function will trigger, works by overloading this class and overriding this function.
wsName | std::string; the name of the workspace |
ws | Workspace_sptr; the WorkspaceGroup that was ungrouped |
Reimplemented from Mantid::API::AnalysisDataServiceObserver.
Definition at line 72 of file AnalysisDataServiceObserverAdapter.cpp.
References getSelf().
|
private |
Value of "self" used by python to refer to an instance of this class.
Definition at line 42 of file AnalysisDataServiceObserverAdapter.h.