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
9#include <stdexcept>
10#include <string>
11#include <vector>
12
13class ApplicationWindow;
14
15namespace MantidQt {
16namespace API {
17
26public:
29 virtual ~IProjectSerialisable() = default;
30
31 static IProjectSerialisable *loadFromProject(const std::string &lines, ApplicationWindow *app,
32 const int fileVersion) {
33 UNUSED_ARG(lines);
34 UNUSED_ARG(app);
35 UNUSED_ARG(fileVersion);
36 throw std::runtime_error("Not implemented");
37 }
38
40 virtual std::string saveToProject(ApplicationWindow *app) = 0;
42 virtual std::vector<std::string> getWorkspaceNames() = 0;
44 virtual std::string getWindowName() = 0;
46 virtual std::string getWindowType() = 0;
47};
48
49} // namespace API
50} // namespace MantidQt
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition System.h:44
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...