Mantid
Loading...
Searching...
No Matches
StartsWithValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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 "MantidKernel/DllConfig.h"
12
13#include <cstddef>
14#include <set>
15#include <string>
16#include <vector>
17
18namespace Mantid {
19namespace Kernel {
24class MANTID_KERNEL_DLL StartsWithValidator : public Kernel::StringListValidator {
25public:
27 StartsWithValidator(const std::vector<std::string> &values);
28 StartsWithValidator(const std::set<std::string> &values);
29 IValidator_sptr clone() const override;
30
35 template <std::size_t SIZE>
36 StartsWithValidator(const std::array<std::string, SIZE> &values) : Kernel::StringListValidator(values) {}
37
38protected:
39 std::string checkValidity(const std::string &value) const override;
40};
41
42} // namespace Kernel
43} // namespace Mantid
double value
The value of the point.
Definition FitMW.cpp:51
ListValidator is a validator that requires the value of a property to be one of a defined list of pos...
StartsWithValidator is a validator that requires the value of a property to start with one of the str...
StartsWithValidator(const std::array< std::string, SIZE > &values)
Constructor.
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Helper class which provides the Collimation Length for SANS instruments.