Mantid
Loading...
Searching...
No Matches
MementoTableWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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#include "MantidAPI/Column.h"
9
10namespace Mantid {
11
12namespace DataObjects {
13
22class MANTID_DATAOBJECTS_DLL MementoTableWorkspace : public TableWorkspace {
23public:
25 static bool isMementoWorkspace(const Mantid::API::ITableWorkspace &candidate);
26 MementoTableWorkspace(int nRows = 0);
27
29 std::unique_ptr<MementoTableWorkspace> clone() const { return std::unique_ptr<MementoTableWorkspace>(doClone()); }
30
32 std::unique_ptr<MementoTableWorkspace> cloneEmpty() const {
33 return std::unique_ptr<MementoTableWorkspace>(doCloneEmpty());
34 }
35
36protected:
39
40private:
41 MementoTableWorkspace *doClone() const override { return new MementoTableWorkspace(*this); }
42
43 MementoTableWorkspace *doCloneEmpty() const override { return new MementoTableWorkspace(); }
44
45 static bool expectedColumn(const Mantid::API::Column_const_sptr &expected,
46 const Mantid::API::Column_const_sptr &candidate);
47};
48} // namespace DataObjects
49} // namespace Mantid
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
Variation on the TableWorkspace with a set of pre-defined columns used to store diffs on Workspaces.
std::unique_ptr< MementoTableWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
std::unique_ptr< MementoTableWorkspace > clone() const
Returns a clone of the workspace.
MementoTableWorkspace & operator=(const MementoTableWorkspace &)=delete
MementoTableWorkspace * doClone() const override
Virtual clone method. Not implemented to force implementation in children.
MementoTableWorkspace(const MementoTableWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
MementoTableWorkspace * doCloneEmpty() const override
Virtual cloneEmpty method.
TableWorkspace is an implementation of Workspace in which the data are organised in columns of same s...
std::shared_ptr< const Column > Column_const_sptr
Definition: Column.h:229
Helper class which provides the Collimation Length for SANS instruments.