All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BoundedVerifier< TYPE > Class Template Reference

#include <GaudiKernel/PropertyVerifier.h>

Inheritance diagram for BoundedVerifier< TYPE >:
Collaboration diagram for BoundedVerifier< TYPE >:

Public Member Functions

 BoundedVerifier ()
 Constructors. More...
 
virtual ~BoundedVerifier ()
 Destructor. More...
 
bool isValid (const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal value) const
 Check if the value is within bounds. More...
 
bool hasLower () const
 Return if it has a lower bound. More...
 
bool hasUpper () const
 Return if it has a lower bound. More...
 
const T & lower () const
 Return the lower bound value. More...
 
const T & upper () const
 Return the upper bound value. More...
 
void setLower (const T &value)
 Set lower bound value. More...
 
void setUpper (const T &value)
 Set upper bound value. More...
 
void clearLower ()
 Clear lower bound value. More...
 
void clearUpper ()
 Clear upper bound value. More...
 
void setBounds (const T &lower, const T &upper)
 Set both bounds (lower and upper) at the same time. More...
 
void clearBounds ()
 Clear both bounds (lower and upper) at the same time. More...
 
template<>
bool isValid (const Gaudi::Histo1DDef *value) const
 
- Public Member Functions inherited from PropertyVerifier< T >
virtual ~PropertyVerifier ()
 

Private Attributes

bool m_hasLowerBound
 Data and Function Members for This Class Implementation. More...
 
bool m_hasUpperBound
 
m_lowerBound
 
m_upperBound
 

Detailed Description

template<class TYPE>
class BoundedVerifier< TYPE >

Author
CTDay

Definition at line 13 of file HistoProperty.h.

Constructor & Destructor Documentation

template<class TYPE >
BoundedVerifier< TYPE >::BoundedVerifier ( )
inline

Constructors.

Definition at line 73 of file PropertyVerifier.h.

74  : m_hasLowerBound( false ),
75  m_hasUpperBound( false ),
76  m_lowerBound( T() ),
77  m_upperBound( T() ) { }
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
virtual BoundedVerifier< TYPE >::~BoundedVerifier ( )
inlinevirtual

Destructor.

Definition at line 80 of file PropertyVerifier.h.

80 { }

Member Function Documentation

template<class TYPE >
void BoundedVerifier< TYPE >::clearBounds ( )
inline

Clear both bounds (lower and upper) at the same time.

Definition at line 116 of file PropertyVerifier.h.

117  {
118  clearLower();
119  clearUpper();
120  }
void clearLower()
Clear lower bound value.
void clearUpper()
Clear upper bound value.
template<class TYPE >
void BoundedVerifier< TYPE >::clearLower ( )
inline

Clear lower bound value.

Definition at line 104 of file PropertyVerifier.h.

104 { m_hasLowerBound = false; m_lowerBound = T(); }
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
void BoundedVerifier< TYPE >::clearUpper ( )
inline

Clear upper bound value.

Definition at line 106 of file PropertyVerifier.h.

106 { m_hasUpperBound = false; m_upperBound = T(); }
template<class TYPE >
bool BoundedVerifier< TYPE >::hasLower ( ) const
inline

Return if it has a lower bound.

Definition at line 91 of file PropertyVerifier.h.

91 { return m_hasLowerBound; }
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
bool BoundedVerifier< TYPE >::hasUpper ( ) const
inline

Return if it has a lower bound.

Definition at line 93 of file PropertyVerifier.h.

93 { return m_hasUpperBound; }
template<>
bool BoundedVerifier< Gaudi::Histo1DDef >::isValid ( const Gaudi::Histo1DDef value) const
inline
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-09-18

Definition at line 26 of file HistoProperty.h.

27 {
28  return 0 != value && value->ok()
29  && ( ( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true )
30  && ( ( m_hasUpperBound && ( m_upperBound < *value ) ) ? false : true ) ;
31 }
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:102
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
bool BoundedVerifier< TYPE >::isValid ( const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal  value) const
inlinevirtual

Check if the value is within bounds.

Implements PropertyVerifier< T >.

Definition at line 83 of file PropertyVerifier.h.

84  {
85  return
86  (( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true ) &&
87  (( m_hasUpperBound && ( *value > m_upperBound ) ) ? false : true ) ;
88  }
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
const T& BoundedVerifier< TYPE >::lower ( ) const
inline

Return the lower bound value.

Definition at line 95 of file PropertyVerifier.h.

95 { return m_lowerBound; }
template<class TYPE >
void BoundedVerifier< TYPE >::setBounds ( const T &  lower,
const T &  upper 
)
inline

Set both bounds (lower and upper) at the same time.

Definition at line 109 of file PropertyVerifier.h.

110  {
111  setLower( lower );
112  setUpper( upper );
113  }
const T & lower() const
Return the lower bound value.
void setUpper(const T &value)
Set upper bound value.
const T & upper() const
Return the upper bound value.
void setLower(const T &value)
Set lower bound value.
template<class TYPE >
void BoundedVerifier< TYPE >::setLower ( const T &  value)
inline

Set lower bound value.

Definition at line 100 of file PropertyVerifier.h.

100 { m_hasLowerBound = true; m_lowerBound = value; }
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
template<class TYPE >
void BoundedVerifier< TYPE >::setUpper ( const T &  value)
inline

Set upper bound value.

Definition at line 102 of file PropertyVerifier.h.

template<class TYPE >
const T& BoundedVerifier< TYPE >::upper ( ) const
inline

Return the upper bound value.

Definition at line 97 of file PropertyVerifier.h.

97 { return m_upperBound; }

Member Data Documentation

template<class TYPE >
bool BoundedVerifier< TYPE >::m_hasLowerBound
private

Data and Function Members for This Class Implementation.

Data members

Definition at line 125 of file PropertyVerifier.h.

template<class TYPE >
bool BoundedVerifier< TYPE >::m_hasUpperBound
private

Definition at line 126 of file PropertyVerifier.h.

template<class TYPE >
T BoundedVerifier< TYPE >::m_lowerBound
private

Definition at line 127 of file PropertyVerifier.h.

template<class TYPE >
T BoundedVerifier< TYPE >::m_upperBound
private

Definition at line 128 of file PropertyVerifier.h.


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