Mantid
Loading...
Searching...
No Matches
TableWorkspaceNotEmptyValidator.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 <utility>
8
10
11namespace Mantid::DataObjects {
12
17
22 return std::make_shared<TableWorkspaceNotEmptyValidator>(*this);
23}
24
30 if (value->columnCount() == 0) {
31 return "The workspace must have at least 1 column";
32 }
33 if (value->rowCount() == 0) {
34 return "The workspace must have at least 1 row";
35 }
36
37 return "";
38}
39
40} // namespace Mantid::DataObjects
double value
The value of the point.
Definition FitMW.cpp:51
Kernel::IValidator_sptr clone() const override
Clone the current state.
std::string checkValidity(const TableWorkspace_sptr &value) const override
Check for validity.
An interface for those validators that require the MatrixWorkspace interface.
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition IValidator.h:26