Mantid
Loading...
Searching...
No Matches
ArrayBoundedValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
10
11namespace Mantid {
12namespace Kernel {
22template <typename TYPE>
23class MANTID_KERNEL_DLL ArrayBoundedValidator final : public TypedValidator<std::vector<TYPE>> {
24public:
27 ArrayBoundedValidator(const TYPE lowerBound, const TYPE upperBound) noexcept;
28 ArrayBoundedValidator(TYPE lowerBound, TYPE upperBound, bool exclusive) noexcept;
31 IValidator_sptr clone() const override;
33 bool hasLower() const noexcept;
35 bool hasUpper() const noexcept;
37 TYPE lower() const noexcept;
39 TYPE upper() const noexcept;
40 bool isLowerExclusive() const noexcept;
42 bool isUpperExclusive() const noexcept;
44 void setLowerExclusive(const bool exclusive) noexcept;
46 void setUpperExclusive(const bool exclusive) noexcept;
47
49 void setExclusive(const bool exclusive) noexcept;
50
52 void setLower(const TYPE &value) noexcept;
54 void setUpper(const TYPE &value) noexcept;
56 void clearLower() noexcept;
58 void clearUpper() noexcept;
59
61 void setError(const TYPE &value) noexcept;
62
63private:
64 std::string checkValidity(const std::vector<TYPE> &value) const override;
65
66 BoundedValidator<TYPE> m_actualValidator;
67};
68
69} // namespace Kernel
70} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
double lower
lower and upper bounds on the multiplier, if known
double upper
Kernel/ArrayBoundedValidator.h.
BoundedValidator is a validator that requires the values to be between upper or lower bounds,...
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition: IValidator.h:26
Helper class which provides the Collimation Length for SANS instruments.
STL namespace.