Mantid
Loading...
Searching...
No Matches
WorkspaceProvider.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
10#include <map>
11#include <memory>
12#include <string>
13
14namespace MantidQt {
15namespace MantidWidgets {
16
18
19using Presenter_sptr = std::shared_ptr<WorkspaceProviderNotifiable>;
20using Presenter_wptr = std::weak_ptr<WorkspaceProviderNotifiable>;
21
29public:
30 virtual ~WorkspaceProvider() = default;
31
32 virtual void registerPresenter(Presenter_wptr presenter) = 0;
33 virtual bool doesWorkspaceExist(const std::string &wsname) const = 0;
34 virtual std::map<std::string, Mantid::API::Workspace_sptr> topLevelItems() const = 0;
35 virtual std::string getOldName() const = 0;
36 virtual std::string getNewName() const = 0;
37};
38
39} // namespace MantidWidgets
40} // namespace MantidQt
virtual std::string getNewName() const =0
virtual std::string getOldName() const =0
virtual void registerPresenter(Presenter_wptr presenter)=0
virtual std::map< std::string, Mantid::API::Workspace_sptr > topLevelItems() const =0
virtual bool doesWorkspaceExist(const std::string &wsname) const =0
Mixin class allows ADS notifications.
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...