Mantid
|
#include <AnalysisDataServiceObserver.h>
Public Member Functions | |
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 | |
void | _addHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::AddNotification > &pNf) |
void | _clearHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::ClearNotification > &pNf) |
void | _deleteHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::PreDeleteNotification > &pNf) |
void | _groupHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::GroupWorkspacesNotification > &pNf) |
void | _groupUpdateHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::GroupUpdatedNotification > &pNf) |
void | _renameHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::RenameNotification > &pNf) |
void | _replaceHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::AfterReplaceNotification > &pNf) |
void | _unGroupHandle (const Poco::AutoPtr< AnalysisDataServiceImpl::UnGroupingWorkspaceNotification > &pNf) |
Definition at line 38 of file AnalysisDataServiceObserver.h.
Mantid::API::AnalysisDataServiceObserver::AnalysisDataServiceObserver | ( | ) |
Definition at line 22 of file AnalysisDataServiceObserver.cpp.
|
virtual |
Definition at line 32 of file AnalysisDataServiceObserver.cpp.
References observeAll().
|
private |
Definition at line 247 of file AnalysisDataServiceObserver.cpp.
References addHandle(), and anyChangeHandle().
|
private |
Definition at line 264 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), clearHandle(), and UNUSED_ARG.
|
private |
Definition at line 258 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and deleteHandle().
|
private |
Definition at line 275 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and groupHandle().
|
private |
Definition at line 287 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and groupUpdateHandle().
|
private |
Definition at line 270 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and renameHandle().
|
private |
Definition at line 252 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and replaceHandle().
|
private |
Definition at line 281 of file AnalysisDataServiceObserver.cpp.
References anyChangeHandle(), and unGroupHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 160 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _addHandle().
|
virtual |
If anyChange to the ADS occurs then this function will trigger, works by overloading this class and overriding this function.
Reimplemented in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 151 of file AnalysisDataServiceObserver.cpp.
Referenced by _addHandle(), _clearHandle(), _deleteHandle(), _groupHandle(), _groupUpdateHandle(), _renameHandle(), _replaceHandle(), and _unGroupHandle().
|
virtual |
If the ADS is cleared, then this function will trigger, works by overloading this class and overriding this function.
Reimplemented in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter, and MantidQt::MantidWidgets::FitScriptGeneratorView.
Definition at line 193 of file AnalysisDataServiceObserver.cpp.
Referenced by _clearHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter, and MantidQt::MantidWidgets::FitScriptGeneratorView.
Definition at line 184 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _deleteHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 214 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _groupHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 239 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _groupUpdateHandle().
void Mantid::API::AnalysisDataServiceObserver::observeAdd | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a workspace is added to it.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 65 of file AnalysisDataServiceObserver.cpp.
References m_addObserver, and m_observingAdd.
Referenced by export_AnalysisDataServiceObserver(), and observeAll().
void Mantid::API::AnalysisDataServiceObserver::observeAll | ( | bool | turnOn = true | ) |
Function will turn on/off all observers for the ADS.
turnOn | bool; if this is True, then if not already present, the observer will be added else removed if it's false. |
Definition at line 47 of file AnalysisDataServiceObserver.cpp.
References observeAdd(), observeClear(), observeDelete(), observeGroup(), observeGroupUpdate(), observeRename(), observeReplace(), and observeUnGroup().
Referenced by export_AnalysisDataServiceObserver(), and ~AnalysisDataServiceObserver().
void Mantid::API::AnalysisDataServiceObserver::observeClear | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when the ADS is cleared.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 96 of file AnalysisDataServiceObserver.cpp.
References m_clearObserver, and m_observingClear.
Referenced by export_AnalysisDataServiceObserver(), MantidQt::MantidWidgets::FitScriptGeneratorView::FitScriptGeneratorView(), observeAll(), and MantidQt::MantidWidgets::FitScriptGeneratorView::~FitScriptGeneratorView().
void Mantid::API::AnalysisDataServiceObserver::observeDelete | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a workspace is deleted.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 85 of file AnalysisDataServiceObserver.cpp.
References m_deleteObserver, and m_observingDelete.
Referenced by export_AnalysisDataServiceObserver(), MantidQt::MantidWidgets::FitScriptGeneratorView::FitScriptGeneratorView(), observeAll(), and MantidQt::MantidWidgets::FitScriptGeneratorView::~FitScriptGeneratorView().
void Mantid::API::AnalysisDataServiceObserver::observeGroup | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a group is added/created in the ADS.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 118 of file AnalysisDataServiceObserver.cpp.
References m_groupObserver, and m_observingGroup.
Referenced by export_AnalysisDataServiceObserver(), and observeAll().
void Mantid::API::AnalysisDataServiceObserver::observeGroupUpdate | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for if a workspace is added to a group or removed.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 140 of file AnalysisDataServiceObserver.cpp.
References m_groupUpdatedObserver, and m_observingGroupUpdate.
Referenced by export_AnalysisDataServiceObserver(), and observeAll().
void Mantid::API::AnalysisDataServiceObserver::observeRename | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a workspace is renamed.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 107 of file AnalysisDataServiceObserver.cpp.
References m_observingRename, and m_renameObserver.
Referenced by export_AnalysisDataServiceObserver(), MantidQt::MantidWidgets::FitScriptGeneratorView::FitScriptGeneratorView(), observeAll(), and MantidQt::MantidWidgets::FitScriptGeneratorView::~FitScriptGeneratorView().
void Mantid::API::AnalysisDataServiceObserver::observeReplace | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a workspace is replaced.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 74 of file AnalysisDataServiceObserver.cpp.
References m_observingReplace, and m_replaceObserver.
Referenced by export_AnalysisDataServiceObserver(), and observeAll().
void Mantid::API::AnalysisDataServiceObserver::observeUnGroup | ( | bool | turnOn = true | ) |
Function will add/remove the observer to the ADS for when a group is removed/delete from the ADS.
turnOn | bool; if this is True then, if not already present, the observer will be added else removed if it's false. |
Definition at line 129 of file AnalysisDataServiceObserver.cpp.
References m_observingUnGroup, and m_unGroupObserver.
Referenced by export_AnalysisDataServiceObserver(), and observeAll().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter, and MantidQt::MantidWidgets::FitScriptGeneratorView.
Definition at line 202 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _renameHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 172 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _replaceHandle().
|
virtual |
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 in Mantid::PythonInterface::AnalysisDataServiceObserverAdapter.
Definition at line 226 of file AnalysisDataServiceObserver.cpp.
References UNUSED_ARG.
Referenced by _unGroupHandle().
|
private |
Poco::NObserver for AddNotification.
Definition at line 77 of file AnalysisDataServiceObserver.h.
Referenced by observeAdd().
|
private |
Poco::NObserver for ClearNotification.
Definition at line 86 of file AnalysisDataServiceObserver.h.
Referenced by observeClear().
|
private |
Poco::NObserver for DeleteNotification.
Definition at line 83 of file AnalysisDataServiceObserver.h.
Referenced by observeDelete().
|
private |
Poco::NObserver for GroupNotification.
Definition at line 92 of file AnalysisDataServiceObserver.h.
Referenced by observeGroup().
|
private |
Poco::NObserver for GroupUpdateNotification.
Definition at line 100 of file AnalysisDataServiceObserver.h.
Referenced by observeGroupUpdate().
|
private |
Definition at line 64 of file AnalysisDataServiceObserver.h.
Referenced by observeAdd().
|
private |
Definition at line 64 of file AnalysisDataServiceObserver.h.
Referenced by observeClear().
|
private |
Definition at line 64 of file AnalysisDataServiceObserver.h.
Referenced by observeDelete().
|
private |
Definition at line 65 of file AnalysisDataServiceObserver.h.
Referenced by observeGroup().
|
private |
Definition at line 65 of file AnalysisDataServiceObserver.h.
Referenced by observeGroupUpdate().
|
private |
Definition at line 65 of file AnalysisDataServiceObserver.h.
Referenced by observeRename().
|
private |
Definition at line 64 of file AnalysisDataServiceObserver.h.
Referenced by observeReplace().
|
private |
Definition at line 65 of file AnalysisDataServiceObserver.h.
Referenced by observeUnGroup().
|
private |
Poco::NObserver for RenameNotification.
Definition at line 89 of file AnalysisDataServiceObserver.h.
Referenced by observeRename().
|
private |
Poco::NObserver for ReplaceNotification.
Definition at line 80 of file AnalysisDataServiceObserver.h.
Referenced by observeReplace().
|
private |
Poco::NObserver for UnGroupNotification.
Definition at line 96 of file AnalysisDataServiceObserver.h.
Referenced by observeUnGroup().