Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Kernel::ArrayBoundedValidator< TYPE > Class Template Referencefinal

Kernel/ArrayBoundedValidator.h. More...

#include <ArrayBoundedValidator.h>

Inheritance diagram for Mantid::Kernel::ArrayBoundedValidator< TYPE >:

Public Member Functions

 ArrayBoundedValidator ()=default
 
 ArrayBoundedValidator (BoundedValidator< TYPE > &bv) noexcept
 Constructor via a BoundedValidator. More...
 
 ArrayBoundedValidator (const ArrayBoundedValidator< TYPE > &abv) noexcept
 Copy constructor. More...
 
 ArrayBoundedValidator (const TYPE lowerBound, const TYPE upperBound) noexcept
 Constructor via bounds parameters. More...
 
 ArrayBoundedValidator (TYPE lowerBound, TYPE upperBound, bool exclusive) noexcept
 
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
 
bool isUpperExclusive () const noexcept
 Check if upper bound is exclusive. More...
 
TYPE lower () const noexcept
 Return the lower bound value. More...
 
void setError (const TYPE &value) noexcept
 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 std::vector< TYPE > &value) const override
 Function that actually does the work of checking the validity of the array elements. More...
 

Private Attributes

BoundedValidator< TYPEm_actualValidator
 

Detailed Description

template<typename TYPE>
class Mantid::Kernel::ArrayBoundedValidator< TYPE >

Kernel/ArrayBoundedValidator.h.

ArrayBoundedValidator is a validator that requires all values in an array to be between upper or lower bounds, or both.

Author
Michael Reuter, NScD Oak Ridge National Laboratory
Date
09/11/2010

Definition at line 23 of file ArrayBoundedValidator.h.

Constructor & Destructor Documentation

◆ ArrayBoundedValidator() [1/5]

template<typename TYPE >
Mantid::Kernel::ArrayBoundedValidator< TYPE >::ArrayBoundedValidator ( )
default

◆ ArrayBoundedValidator() [2/5]

template<typename TYPE >
Mantid::Kernel::ArrayBoundedValidator< TYPE >::ArrayBoundedValidator ( const ArrayBoundedValidator< TYPE > &  abv)
noexcept

Copy constructor.

Parameters
abv:: the ArrayBoundedValidator to copy

Definition at line 19 of file ArrayBoundedValidator.cpp.

◆ ArrayBoundedValidator() [3/5]

template<typename TYPE >
Mantid::Kernel::ArrayBoundedValidator< TYPE >::ArrayBoundedValidator ( const TYPE  lowerBound,
const TYPE  upperBound 
)
noexcept

Constructor via bounds parameters.

Parameters
lowerBound:: the lower bound value to validate
upperBound:: the upper bound value to validate

Definition at line 28 of file ArrayBoundedValidator.cpp.

◆ ArrayBoundedValidator() [4/5]

template<typename TYPE >
Mantid::Kernel::ArrayBoundedValidator< TYPE >::ArrayBoundedValidator ( TYPE  lowerBound,
TYPE  upperBound,
bool  exclusive 
)
noexcept

Definition at line 32 of file ArrayBoundedValidator.cpp.

◆ ArrayBoundedValidator() [5/5]

template<typename TYPE >
Mantid::Kernel::ArrayBoundedValidator< TYPE >::ArrayBoundedValidator ( BoundedValidator< TYPE > &  bv)
noexcept

Constructor via a BoundedValidator.

Parameters
bv:: the BoundedValidator object to use

Definition at line 40 of file ArrayBoundedValidator.cpp.

Member Function Documentation

◆ checkValidity()

template<typename TYPE >
std::string Mantid::Kernel::ArrayBoundedValidator< TYPE >::checkValidity ( const std::vector< TYPE > &  value) const
overrideprivate

Function that actually does the work of checking the validity of the array elements.

Parameters
value:: the array to be checked
Returns
a listing of the indicies that fail the bounds checks

Definition at line 57 of file ArrayBoundedValidator.cpp.

References error, index, and value.

◆ clearLower()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::clearLower
noexcept

Clear lower bound value.

Definition at line 117 of file ArrayBoundedValidator.cpp.

◆ clearUpper()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::clearUpper
noexcept

Clear upper bound value.

Definition at line 119 of file ArrayBoundedValidator.cpp.

◆ clone()

template<typename TYPE >
IValidator_sptr Mantid::Kernel::ArrayBoundedValidator< TYPE >::clone
override

Clone the current state.

Create a clone of the current ArrayBoundedValidator.

Returns
the cloned object

Definition at line 47 of file ArrayBoundedValidator.cpp.

◆ hasLower()

template<typename TYPE >
bool Mantid::Kernel::ArrayBoundedValidator< TYPE >::hasLower
noexcept

Return if it has a lower bound.

Definition at line 75 of file ArrayBoundedValidator.cpp.

◆ hasUpper()

template<typename TYPE >
bool Mantid::Kernel::ArrayBoundedValidator< TYPE >::hasUpper
noexcept

Return if it has a lower bound.

Definition at line 79 of file ArrayBoundedValidator.cpp.

◆ isLowerExclusive()

template<typename TYPE >
bool Mantid::Kernel::ArrayBoundedValidator< TYPE >::isLowerExclusive
noexcept

Definition at line 87 of file ArrayBoundedValidator.cpp.

◆ isUpperExclusive()

template<typename TYPE >
bool Mantid::Kernel::ArrayBoundedValidator< TYPE >::isUpperExclusive
noexcept

Check if upper bound is exclusive.

Definition at line 91 of file ArrayBoundedValidator.cpp.

◆ lower()

template<typename TYPE >
TYPE Mantid::Kernel::ArrayBoundedValidator< TYPE >::lower
noexcept

Return the lower bound value.

Definition at line 83 of file ArrayBoundedValidator.cpp.

◆ setError()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setError ( const TYPE value)
noexcept

Set the allowed error.

Definition at line 121 of file ArrayBoundedValidator.cpp.

References value.

◆ setExclusive()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setExclusive ( const bool  exclusive)
noexcept

Set both the upper and lower bounds to be exclusive.

Definition at line 104 of file ArrayBoundedValidator.cpp.

◆ setLower()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setLower ( const TYPE value)
noexcept

Set lower bound value.

Definition at line 109 of file ArrayBoundedValidator.cpp.

References value.

Referenced by Mantid::CurveFitting::Functions::BSpline::resetValidators().

◆ setLowerExclusive()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setLowerExclusive ( const bool  exclusive)
noexcept

Set the lower bound to be exclusive.

Definition at line 95 of file ArrayBoundedValidator.cpp.

◆ setUpper()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setUpper ( const TYPE value)
noexcept

Set upper bound value.

Definition at line 113 of file ArrayBoundedValidator.cpp.

References value.

◆ setUpperExclusive()

template<typename TYPE >
void Mantid::Kernel::ArrayBoundedValidator< TYPE >::setUpperExclusive ( const bool  exclusive)
noexcept

Set the upper bound to be exclusive.

Definition at line 99 of file ArrayBoundedValidator.cpp.

◆ upper()

template<typename TYPE >
TYPE Mantid::Kernel::ArrayBoundedValidator< TYPE >::upper
noexcept

Return the upper bound value.

Definition at line 85 of file ArrayBoundedValidator.cpp.

Member Data Documentation

◆ m_actualValidator

template<typename TYPE >
BoundedValidator<TYPE> Mantid::Kernel::ArrayBoundedValidator< TYPE >::m_actualValidator
private

Definition at line 66 of file ArrayBoundedValidator.h.


The documentation for this class was generated from the following files: