Skip to content

Commit

Permalink
Re #12687 Added doClone() to mock workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHeybrock committed Jun 29, 2015
1 parent 6e8b718 commit 910d35d
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/WorkspaceGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class MANTID_API_DLL WorkspaceGroup : public Workspace {
const WorkspaceGroup &operator=(const WorkspaceGroup &);

private:
virtual WorkspaceGroup *doClone() const override {
virtual WorkspaceGroup *doClone() const {
throw std::runtime_error("Cloning of WorkspaceGroup is not implemented.");
}
/// ADS removes a member of this group using this method. It doesn't send
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/test/AnalysisDataServiceTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace
virtual size_t getMemorySize() const { return 1; }

private:
virtual MockWorkspace *doClone() const override {
virtual MockWorkspace *doClone() const {
throw std::runtime_error("Cloning of MockWorkspace is not implemented.");
}
};
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/test/CompositeFunctionTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class CompositeFunctionTest_MocMatrixWorkspace : public MatrixWorkspace
void clearFileBacked(bool ){};
ITableWorkspace_sptr makeBoxTable(size_t /* start*/, size_t /*num*/){return ITableWorkspace_sptr();}
private:
virtual CompositeFunctionTest_MocMatrixWorkspace *doClone() const override {
virtual CompositeFunctionTest_MocMatrixWorkspace *doClone() const {
throw std::runtime_error("Cloning of "
"CompositeFunctionTest_MocMatrixWorkspace is not "
"implemented.");
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/test/ScopedWorkspaceTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MockWorkspace : public Workspace
virtual size_t getMemorySize() const { return 1; }

private:
virtual MockWorkspace *doClone() const override {
virtual MockWorkspace *doClone() const {
throw std::runtime_error("Cloning of MockWorkspace is not implemented.");
}
};
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/test/WorkspaceGroupTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class WorkspaceGroupTest : public CxxTest::TestSuite
MOCK_CONST_METHOD0(getMemorySize, size_t());

private:
virtual MockWorkspace *doClone() const override {
virtual MockWorkspace *doClone() const {
throw std::runtime_error("Cloning of MockWorkspace is not implemented.");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace
{}

private:
virtual MockIEventWorkspace *doClone() const override {
virtual MockIEventWorkspace *doClone() const {
throw std::runtime_error(
"Cloning of MockIEventWorkspace is not implemented.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class DLLExport EventWorkspace : public API::IEventWorkspace {
EventWorkspace &operator=(const EventWorkspace &other);

private:
virtual EventWorkspace *doClone() const override {
virtual EventWorkspace *doClone() const {
throw std::runtime_error("Cloning of EventWorkspace is not implemented.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class DLLExport MDEventWorkspace : public API::IMDEventWorkspace {
API::BoxController_sptr m_BoxController;
// boost::shared_ptr<BoxCtrlChangesList > m_BoxController;
private:
virtual MDEventWorkspace *doClone() const override {
virtual MDEventWorkspace *doClone() const {
throw std::runtime_error("Cloning of MDEventWorkspace is not implemented.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class DLLExport MDHistoWorkspace : public API::IMDHistoWorkspace {
virtual Mantid::API::MDNormalization displayNormalization() const;

private:
virtual MDHistoWorkspace *doClone() const override {
virtual MDHistoWorkspace *doClone() const {
return new MDHistoWorkspace(*this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class DLLExport PeaksWorkspace : public Mantid::API::IPeaksWorkspace {
PeaksWorkspace &operator=(const PeaksWorkspace &other);

private:
virtual PeaksWorkspace *doClone() const override {
virtual PeaksWorkspace *doClone() const {
return new PeaksWorkspace(*this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class MANTID_DATAOBJECTS_DLL TableWorkspace
TableWorkspace &operator=(const TableWorkspace &other);

private:
virtual TableWorkspace *doClone() const override {
virtual TableWorkspace *doClone() const {
return new TableWorkspace(*this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class DLLExport Workspace2D : public API::MatrixWorkspace {
std::vector<Mantid::API::ISpectrum *> data;

private:
virtual Workspace2D *doClone() const override {
virtual Workspace2D *doClone() const {
throw std::runtime_error("Cloning of Workspace2D is not implemented.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class DLLExport WorkspaceSingleValue : public API::MatrixWorkspace {
WorkspaceSingleValue &operator=(const WorkspaceSingleValue &other);

private:
virtual WorkspaceSingleValue *doClone() const override {
virtual WorkspaceSingleValue *doClone() const {
throw std::runtime_error("Cloning of WorkspaceSingleValue is not implemented.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class WorkspaceTester : public MatrixWorkspace {
}

private:
virtual WorkspaceTester *doClone() const override {
virtual WorkspaceTester *doClone() const {
throw std::runtime_error("Cloning of WorkspaceTester is not implemented.");
}
std::vector<SpectrumTester> vec;
Expand Down Expand Up @@ -236,7 +236,7 @@ class TableWorkspaceTester : public ITableWorkspace {
}

private:
virtual TableWorkspaceTester *doClone() const override {
virtual TableWorkspaceTester *doClone() const {
throw std::runtime_error(
"Cloning of TableWorkspaceTester is not implemented.");
}
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidQt/API/test/SignalRangeTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SignalRangeTest : public CxxTest::TestSuite
MOCK_METHOD0(clearMDMasking, void());
MOCK_CONST_METHOD0(getSpecialCoordinateSystem, Mantid::Kernel::SpecialCoordinateSystem());
private:
virtual MockMDWorkspace *doClone() const override {
virtual MockMDWorkspace *doClone() const {
throw std::runtime_error(
"Cloning of MockMDWorkspace is not implemented.");
}
Expand Down
6 changes: 6 additions & 0 deletions Code/Mantid/Vates/VatesAPI/test/MockObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class MockIMDWorkspace: public Mantid::API::IMDWorkspace
}

virtual ~MockIMDWorkspace() {}

private:
virtual MockIMDWorkspace *doClone() const {
throw std::runtime_error(
"Cloning of MockIMDWorkspace is not implemented.");
}
};


Expand Down

0 comments on commit 910d35d

Please sign in to comment.