40 const auto &shape =
value->sample().getShape();
41 std::list<std::string> missing;
43 missing.emplace_back(
"shape");
44 const auto &material = shape.material();
46 missing.emplace_back(
"material");
51 return "The sample is missing the following properties: " + join(missing.begin(), missing.end(),
",");
double value
The value of the point.
SampleValidator(const unsigned int flags=(Shape|Material))
Construct a validator with a set of requirements.
Kernel::IValidator_sptr clone() const override
std::string getType() const
std::string checkValidity(const MatrixWorkspace_sptr &value) const override
Check if the workspace satisfies the validation requirements.
A material is defined as being composed of a given element, defined as a PhysicalConstants::NeutronAt...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
DLLExport std::string join(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator, typename std::enable_if<!(std::is_same< typename std::iterator_traits< ITERATOR_TYPE >::iterator_category, std::random_access_iterator_tag >::value)>::type *=nullptr)
Join a set or vector of (something that turns into a string) together into one string,...
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.