Mantid
Loading...
Searching...
No Matches
ADSAdapter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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
12#include <Poco/NObserver.h>
13
14namespace MantidQt {
15namespace MantidWidgets {
23public:
24 explicit ADSAdapter();
25 ~ADSAdapter() override;
26
27 // delete copy constructors and assignment operators -- Poco::NObserver is not copyable
28 ADSAdapter(const ADSAdapter &) = delete;
29 ADSAdapter &operator=(const ADSAdapter &) = delete;
30
31 void registerPresenter(Presenter_wptr presenter) override;
32 bool doesWorkspaceExist(const std::string &wsname) const override;
33
34 std::map<std::string, Mantid::API::Workspace_sptr> topLevelItems() const override;
35
36 std::string getOldName() const override;
37 std::string getNewName() const override;
38
39private:
40 std::string m_oldName;
41 std::string m_newName;
42
44
45 Presenter_sptr lockPresenter();
46
47 // ADS Notification Handlers
48 void handleAddWorkspace(Mantid::API::WorkspaceAddNotification_ptr pNf);
50
51 void handleReplaceWorkspace(Mantid::API::WorkspaceAfterReplaceNotification_ptr pNf);
53
54 void handleDeleteWorkspace(Mantid::API::WorkspacePostDeleteNotification_ptr pNf);
56
57 void handleClearADS(Mantid::API::ClearADSNotification_ptr pNf);
59
60 void handleRenameWorkspace(Mantid::API::WorkspaceRenameNotification_ptr pNf);
62
63 void handleGroupWorkspaces(Mantid::API::WorkspacesGroupedNotification_ptr pNf);
65
66 void handleUnGroupWorkspace(Mantid::API::WorkspaceUnGroupingNotification_ptr pNf);
68
69 void handleWorkspaceGroupUpdate(Mantid::API::GroupUpdatedNotification_ptr pNf);
71};
72} // namespace MantidWidgets
73} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition DllOption.h:15
ADSAdapter & operator=(const ADSAdapter &)=delete
Poco::NObserver< ADSAdapter, Mantid::API::GroupUpdatedNotification > m_workspaceGroupUpdateObserver
Definition ADSAdapter.h:70
Poco::NObserver< ADSAdapter, Mantid::API::WorkspacePostDeleteNotification > m_deleteObserver
Definition ADSAdapter.h:55
Poco::NObserver< ADSAdapter, Mantid::API::WorkspacesGroupedNotification > m_groupworkspacesObserver
Definition ADSAdapter.h:64
ADSAdapter(const ADSAdapter &)=delete
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceUnGroupingNotification > m_ungroupworkspaceObserver
Definition ADSAdapter.h:67
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceRenameNotification > m_renameObserver
Definition ADSAdapter.h:61
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceAfterReplaceNotification > m_replaceObserver
Definition ADSAdapter.h:52
Poco::NObserver< ADSAdapter, Mantid::API::ClearADSNotification > m_clearADSObserver
Definition ADSAdapter.h:58
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceAddNotification > m_addObserver
Definition ADSAdapter.h:49
std::shared_ptr< WorkspaceProviderNotifiable > Presenter_sptr
std::weak_ptr< WorkspaceProviderNotifiable > Presenter_wptr
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::AfterReplaceNotification > & WorkspaceAfterReplaceNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::ClearNotification > & ClearADSNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::GroupUpdatedNotification > & GroupUpdatedNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::GroupWorkspacesNotification > & WorkspacesGroupedNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::UnGroupingWorkspaceNotification > & WorkspaceUnGroupingNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::RenameNotification > & WorkspaceRenameNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::AddNotification > & WorkspaceAddNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::PostDeleteNotification > & WorkspacePostDeleteNotification_ptr