|
Mantid
|
ArrayLenghtValidator : Validate length of an array property. More...
#include <ArrayLengthValidator.h>
Public Member Functions | |
| ArrayLengthValidator () | |
| No arg constructor. | |
| ArrayLengthValidator (const size_t len) | |
| Constructor. | |
| ArrayLengthValidator (const size_t lenmin, const size_t lenmax) | |
| Constructor. | |
| void | clearLength () |
| Clear the length. | |
| void | clearLengthMax () |
| Clear maximum. | |
| void | clearLengthMin () |
| Clear minimum. | |
| IValidator_sptr | clone () const override |
| Clone function. | |
| const size_t & | getLength () const |
| Return the length. | |
| const size_t & | getMaxLength () const |
| Return the maximum length. | |
| const size_t & | getMinLength () const |
| Return the minimum length. | |
| bool | hasLength () const |
| Return if it has a length. | |
| bool | hasMaxLength () const |
| Return if it has a length. | |
| bool | hasMinLength () const |
| Return if it has a length. | |
| void | setLength (const size_t &value) |
| Set length. | |
| void | setLengthMax (const size_t &value) |
| Set length max. | |
| void | setLengthMin (const size_t &value) |
| Set length min. | |
| ~ArrayLengthValidator () override | |
| Destructor. | |
Private Member Functions | |
| std::string | checkValidity (const std::vector< TYPE > &value) const override |
| Private function to check validity. | |
Private Attributes | |
| size_t | m_arraySize |
| private variable containing the size of the array | |
| size_t | m_arraySizeMax |
| private variable containing the size max of the array | |
| size_t | m_arraySizeMin |
| private variable containing the minimum size of the array | |
| bool | m_hasArraySize |
| private variable, true if size is set, false if not | |
| bool | m_hasArraySizeMax |
| private variable, true if size max is set, false if not | |
| bool | m_hasArraySizeMin |
| private variable, true if min size is set, false if not | |
ArrayLenghtValidator : Validate length of an array property.
Definition at line 21 of file ArrayLengthValidator.h.
| Mantid::Kernel::ArrayLengthValidator< TYPE >::ArrayLengthValidator | ( | ) |
No arg constructor.
Definition at line 20 of file ArrayLengthValidator.cpp.
| Mantid::Kernel::ArrayLengthValidator< TYPE >::ArrayLengthValidator | ( | const size_t | len | ) |
Constructor.
| len,: | the legth of the array |
Definition at line 28 of file ArrayLengthValidator.cpp.
| Mantid::Kernel::ArrayLengthValidator< TYPE >::ArrayLengthValidator | ( | const size_t | lenmin, |
| const size_t | lenmax | ||
| ) |
Constructor.
| lenmin,: | the minimum legth of the array |
| lenmax,: | the maximum legth of the array |
Definition at line 37 of file ArrayLengthValidator.cpp.
|
overridedefault |
Destructor.
|
overrideprivate |
Private function to check validity.
Definition at line 153 of file ArrayLengthValidator.cpp.
References value.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::clearLength | ( | ) |
Clear the length.
Function to unset the length.
It sets m_hasArraySize to false, and the m_arraySize to 0
Definition at line 117 of file ArrayLengthValidator.cpp.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::clearLengthMax | ( | ) |
Clear maximum.
Function to unset the maximum length.
It sets m_hasArraySizeMax to false, and the m_arraySizeMax to 0
Definition at line 135 of file ArrayLengthValidator.cpp.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::clearLengthMin | ( | ) |
Clear minimum.
Function to unset the minimum length.
It sets m_hasArraySizeMin to false, and the m_arraySizeMin to 0
Definition at line 126 of file ArrayLengthValidator.cpp.
|
override |
Clone function.
Definition at line 144 of file ArrayLengthValidator.cpp.
| const size_t & Mantid::Kernel::ArrayLengthValidator< TYPE >::getLength | ( | ) | const |
Return the length.
Function to retun the set length.
Definition at line 68 of file ArrayLengthValidator.cpp.
| const size_t & Mantid::Kernel::ArrayLengthValidator< TYPE >::getMaxLength | ( | ) | const |
Return the maximum length.
Function to retun the set maximum length.
Definition at line 80 of file ArrayLengthValidator.cpp.
| const size_t & Mantid::Kernel::ArrayLengthValidator< TYPE >::getMinLength | ( | ) | const |
Return the minimum length.
Function to retun the set minimum length.
Definition at line 74 of file ArrayLengthValidator.cpp.
| bool Mantid::Kernel::ArrayLengthValidator< TYPE >::hasLength | ( | ) | const |
Return if it has a length.
Check if length is set.
Definition at line 50 of file ArrayLengthValidator.cpp.
| bool Mantid::Kernel::ArrayLengthValidator< TYPE >::hasMaxLength | ( | ) | const |
Return if it has a length.
Check if maximum length is set.
Definition at line 62 of file ArrayLengthValidator.cpp.
| bool Mantid::Kernel::ArrayLengthValidator< TYPE >::hasMinLength | ( | ) | const |
Return if it has a length.
Check if minimum length is set.
Definition at line 56 of file ArrayLengthValidator.cpp.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::setLength | ( | const size_t & | value | ) |
Set length.
Function to set the length.
It will automatically clear the minimum and maximum
| value,: | size_t type |
Definition at line 87 of file ArrayLengthValidator.cpp.
References value.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::setLengthMax | ( | const size_t & | value | ) |
Set length max.
Function to set the maximum length.
It will automatically clear the set length
| value,: | size_t type |
Definition at line 107 of file ArrayLengthValidator.cpp.
References value.
| void Mantid::Kernel::ArrayLengthValidator< TYPE >::setLengthMin | ( | const size_t & | value | ) |
Set length min.
Function to set the minimum length.
It will automatically clear the set length
| value,: | size_t type |
Definition at line 98 of file ArrayLengthValidator.cpp.
References value.
|
private |
private variable containing the size of the array
Definition at line 58 of file ArrayLengthValidator.h.
|
private |
private variable containing the size max of the array
Definition at line 66 of file ArrayLengthValidator.h.
|
private |
private variable containing the minimum size of the array
Definition at line 62 of file ArrayLengthValidator.h.
|
private |
private variable, true if size is set, false if not
Definition at line 60 of file ArrayLengthValidator.h.
|
private |
private variable, true if size max is set, false if not
Definition at line 68 of file ArrayLengthValidator.h.
|
private |
private variable, true if min size is set, false if not
Definition at line 64 of file ArrayLengthValidator.h.