#include <GaudiKernel/PropertyVerifier.h>
Inheritance diagram for BoundedVerifier< T >:
Public Member Functions | |
BoundedVerifier () | |
Constructors. | |
virtual | ~BoundedVerifier () |
Destructor. | |
bool | isValid (const T *value) const |
Check if the value is within bounds. | |
bool | hasLower () const |
Return if it has a lower bound. | |
bool | hasUpper () const |
Return if it has a lower bound. | |
const T & | lower () const |
Return the lower bound value. | |
const T & | upper () const |
Return the upper bound value. | |
void | setLower (const T &value) |
Set lower bound value. | |
void | setUpper (const T &value) |
Set upper bound value. | |
void | clearLower () |
Clear lower bound value. | |
void | clearUpper () |
Clear upper bound value. | |
void | setBounds (const T &lower, const T &upper) |
Set both bounds (lower and upper) at the same time. | |
void | clearBounds () |
Clear both bounds (lower and upper) at the same time. | |
template<> | |
bool | isValid (const Gaudi::Histo1DDef *value) const |
Private Attributes | |
bool | m_hasLowerBound |
Data and Function Members for This Class Implementation. | |
bool | m_hasUpperBound |
T | m_lowerBound |
T | m_upperBound |
Definition at line 38 of file PropertyVerifier.h.
BoundedVerifier< T >::BoundedVerifier | ( | ) | [inline] |
Constructors.
Definition at line 41 of file PropertyVerifier.h.
00042 : m_hasLowerBound( false ), 00043 m_hasUpperBound( false ), 00044 m_lowerBound( T() ), 00045 m_upperBound( T() ) { }
virtual BoundedVerifier< T >::~BoundedVerifier | ( | ) | [inline, virtual] |
bool BoundedVerifier< T >::isValid | ( | const T * | value | ) | const [inline, virtual] |
Check if the value is within bounds.
Implements PropertyVerifier< T >.
Definition at line 51 of file PropertyVerifier.h.
00051 { 00052 return (( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true ) 00053 && (( m_hasUpperBound && ( *value > m_upperBound ) ) ? false : true ); 00054 }
bool BoundedVerifier< T >::hasLower | ( | ) | const [inline] |
Return if it has a lower bound.
Definition at line 57 of file PropertyVerifier.h.
00057 { return m_hasLowerBound; }
bool BoundedVerifier< T >::hasUpper | ( | ) | const [inline] |
Return if it has a lower bound.
Definition at line 59 of file PropertyVerifier.h.
00059 { return m_hasUpperBound; }
const T& BoundedVerifier< T >::lower | ( | ) | const [inline] |
Return the lower bound value.
Definition at line 61 of file PropertyVerifier.h.
00061 { return m_lowerBound; }
const T& BoundedVerifier< T >::upper | ( | ) | const [inline] |
Return the upper bound value.
Definition at line 63 of file PropertyVerifier.h.
00063 { return m_upperBound; }
void BoundedVerifier< T >::setLower | ( | const T & | value | ) | [inline] |
Set lower bound value.
Definition at line 66 of file PropertyVerifier.h.
00066 { m_hasLowerBound = true; m_lowerBound = value; }
void BoundedVerifier< T >::setUpper | ( | const T & | value | ) | [inline] |
Set upper bound value.
Definition at line 68 of file PropertyVerifier.h.
00068 { m_hasUpperBound = true; m_upperBound = value; }
void BoundedVerifier< T >::clearLower | ( | ) | [inline] |
Clear lower bound value.
Definition at line 70 of file PropertyVerifier.h.
00070 { m_hasLowerBound = false; m_lowerBound = T(); }
void BoundedVerifier< T >::clearUpper | ( | ) | [inline] |
Clear upper bound value.
Definition at line 72 of file PropertyVerifier.h.
00072 { m_hasUpperBound = false; m_upperBound = T(); }
void BoundedVerifier< T >::setBounds | ( | const T & | lower, | |
const T & | upper | |||
) | [inline] |
void BoundedVerifier< T >::clearBounds | ( | ) | [inline] |
Clear both bounds (lower and upper) at the same time.
Definition at line 81 of file PropertyVerifier.h.
00081 { 00082 clearLower(); 00083 clearUpper(); 00084 }
bool BoundedVerifier< Gaudi::Histo1DDef >::isValid | ( | const Gaudi::Histo1DDef * | value | ) | const [inline] |
Definition at line 26 of file HistoProperty.h.
00027 { 00028 return 0 != value && value->ok() 00029 && ( ( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true ) 00030 && ( ( m_hasUpperBound && ( m_upperBound < *value ) ) ? false : true ) ; 00031 }
bool BoundedVerifier< T >::m_hasLowerBound [private] |
Data and Function Members for This Class Implementation.
Data members
Definition at line 89 of file PropertyVerifier.h.
bool BoundedVerifier< T >::m_hasUpperBound [private] |
Definition at line 90 of file PropertyVerifier.h.
T BoundedVerifier< T >::m_lowerBound [private] |
Definition at line 91 of file PropertyVerifier.h.
T BoundedVerifier< T >::m_upperBound [private] |
Definition at line 92 of file PropertyVerifier.h.