Mantid
|
BoundedValidator is a validator that requires the values to be between upper or lower bounds, or both. More...
#include <Kernel/BoundedValidator.h>
Public Member Functions | |
BoundedValidator () noexcept | |
No-arg Constructor. More... | |
BoundedValidator (const TYPE &lowerBound, const TYPE &upperBound, bool exclusive=false) noexcept | |
Constructor. More... | |
void | clearBounds () noexcept |
Clear both bounds (lower and upper) at the same time. More... | |
void | clearLower () noexcept |
Clear lower bound value. More... | |
void | clearUpper () noexcept |
Clear upper bound value. More... | |
IValidator_sptr | clone () const override |
Clone the current state. More... | |
bool | hasLower () const noexcept |
Return if it has a lower bound. More... | |
bool | hasUpper () const noexcept |
Return if it has a lower bound. More... | |
bool | isLowerExclusive () const noexcept |
Check if lower bound is exclusive. More... | |
bool | isUpperExclusive () const noexcept |
Check if upper bound is exclusive. More... | |
TYPE | lower () const noexcept |
Return the lower bound value. More... | |
void | setBounds (const TYPE &lower, const TYPE &upper) noexcept |
Set both bounds (lower and upper) at the same time. More... | |
void | setError (const std::string &value) |
void | setError (const TYPE &value) |
Set the allowed error. More... | |
void | setExclusive (const bool exclusive) noexcept |
Set both the upper and lower bounds to be exclusive. More... | |
void | setLower (const TYPE &value) noexcept |
Set lower bound value. More... | |
void | setLowerExclusive (const bool exclusive) noexcept |
Set the lower bound to be exclusive. More... | |
void | setUpper (const TYPE &value) noexcept |
Set upper bound value. More... | |
void | setUpperExclusive (const bool exclusive) noexcept |
Set the upper bound to be exclusive. More... | |
TYPE | upper () const noexcept |
Return the upper bound value. More... | |
Private Member Functions | |
std::string | checkValidity (const TYPE &value) const override |
Checks that the value is within any upper and lower limits. More... | |
double | errorAdjustment (const double &boundingValue, const int boundID) const |
int | errorAdjustment (const int &boundingValue, const int boundID) const |
TYPE | errorAdjustment (const TYPE &boundingValue, const int boundID) const |
Private Attributes | |
TYPE | m_error |
the allowed error More... | |
bool | m_hasError |
Has an error set true/false. More... | |
bool | m_hasLowerBound |
Has a lower bound set true/false. More... | |
bool | m_hasUpperBound |
Has a upper bound set true/false. More... | |
TYPE | m_lowerBound |
the lower bound More... | |
bool | m_lowerExclusive |
Lower bound is exclusive. More... | |
TYPE | m_upperBound |
the upper bound More... | |
bool | m_upperExclusive |
Upper bound is exclusive. More... | |
BoundedValidator is a validator that requires the values to be between upper or lower bounds, or both.
It offers both inclusive or exclusive bounds. By default the validator uses inclusive bounds.
Definition at line 32 of file BoundedValidator.h.
|
inlinenoexcept |
No-arg Constructor.
Definition at line 35 of file BoundedValidator.h.
|
inlinenoexcept |
Constructor.
lowerBound | :: The lower bounding value |
upperBound | :: The upper bounding value |
exclusive | :: make bounds exclusive (default inclusive) |
Definition at line 44 of file BoundedValidator.h.
|
inlineoverrideprivate |
Checks that the value is within any upper and lower limits.
value | :: The value to test |
Definition at line 141 of file BoundedValidator.h.
|
inlinenoexcept |
Clear both bounds (lower and upper) at the same time.
Definition at line 101 of file BoundedValidator.h.
|
inlinenoexcept |
Clear lower bound value.
Definition at line 84 of file BoundedValidator.h.
|
inlinenoexcept |
Clear upper bound value.
Definition at line 89 of file BoundedValidator.h.
|
inlineoverride |
Clone the current state.
Definition at line 113 of file BoundedValidator.h.
|
inlineprivate |
Definition at line 177 of file BoundedValidator.h.
|
inlineprivate |
Definition at line 182 of file BoundedValidator.h.
|
inlineprivate |
Definition at line 166 of file BoundedValidator.h.
|
inlinenoexcept |
Return if it has a lower bound.
Definition at line 49 of file BoundedValidator.h.
|
inlinenoexcept |
Return if it has a lower bound.
Definition at line 51 of file BoundedValidator.h.
|
inlinenoexcept |
Check if lower bound is exclusive.
Definition at line 57 of file BoundedValidator.h.
|
inlinenoexcept |
Check if upper bound is exclusive.
Definition at line 59 of file BoundedValidator.h.
|
inlinenoexcept |
Return the lower bound value.
Definition at line 53 of file BoundedValidator.h.
|
inlinenoexcept |
Set both bounds (lower and upper) at the same time.
Definition at line 95 of file BoundedValidator.h.
|
inline |
Definition at line 172 of file BoundedValidator.h.
References value.
|
inline |
|
inlinenoexcept |
Set both the upper and lower bounds to be exclusive.
Definition at line 66 of file BoundedValidator.h.
|
inlinenoexcept |
Set lower bound value.
Definition at line 72 of file BoundedValidator.h.
References value.
Referenced by Mantid::CurveFitting::Functions::BSpline::resetValidators().
|
inlinenoexcept |
Set the lower bound to be exclusive.
Definition at line 61 of file BoundedValidator.h.
|
inlinenoexcept |
Set upper bound value.
Definition at line 78 of file BoundedValidator.h.
References value.
Referenced by Mantid::CurveFitting::Functions::BSpline::resetValidators().
|
inlinenoexcept |
Set the upper bound to be exclusive.
Definition at line 63 of file BoundedValidator.h.
|
inlinenoexcept |
Return the upper bound value.
Definition at line 55 of file BoundedValidator.h.
|
private |
the allowed error
Definition at line 131 of file BoundedValidator.h.
|
private |
Has an error set true/false.
Definition at line 133 of file BoundedValidator.h.
|
private |
Has a lower bound set true/false.
Definition at line 119 of file BoundedValidator.h.
|
private |
Has a upper bound set true/false.
Definition at line 121 of file BoundedValidator.h.
|
private |
the lower bound
Definition at line 127 of file BoundedValidator.h.
|
private |
Lower bound is exclusive.
Definition at line 123 of file BoundedValidator.h.
|
private |
the upper bound
Definition at line 129 of file BoundedValidator.h.
|
private |
Upper bound is exclusive.
Definition at line 125 of file BoundedValidator.h.