Mantid
Loading...
Searching...
No Matches
IProjectSerialisable.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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 <stdexcept>
11#include <string>
12#include <vector>
13
14class ApplicationWindow;
15
16namespace MantidQt {
17namespace API {
18
27public:
30 virtual ~IProjectSerialisable() = default;
31
32 static IProjectSerialisable *loadFromProject(const std::string &lines, ApplicationWindow *app,
33 const int fileVersion) {
34 UNUSED_ARG(lines);
35 UNUSED_ARG(app);
36 UNUSED_ARG(fileVersion);
37 throw std::runtime_error("Not implemented");
38 }
39
41 virtual std::string saveToProject(ApplicationWindow *app) = 0;
43 virtual std::vector<std::string> getWorkspaceNames() = 0;
45 virtual std::string getWindowName() = 0;
47 virtual std::string getWindowType() = 0;
48};
49
50} // namespace API
51} // namespace MantidQt
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition: System.h:64
Defines an interface to a MantidPlot class that can be saved into or loaded from a project.
virtual std::string getWindowType()=0
Returns the type of the window.
static IProjectSerialisable * loadFromProject(const std::string &lines, ApplicationWindow *app, const int fileVersion)
virtual std::string saveToProject(ApplicationWindow *app)=0
Serialises to a string that can be saved to a project file.
virtual std::vector< std::string > getWorkspaceNames()=0
Returns a list of workspace names that are used by this window.
virtual ~IProjectSerialisable()=default
Virtual destructor (required by linker on some versions of OS X/Intel compiler)
virtual std::string getWindowName()=0
Returns the user friendly name of the window.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...