| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# BoundedVerifier< T > Class Template Reference

`#include <GaudiKernel/PropertyVerifier.h>`

Inheritance diagram for BoundedVerifier< T >:
[legend]
Collaboration diagram for BoundedVerifier< T >:
[legend]

List of all members.

## Public Member Functions
| BoundedVerifier ()
| Constructors.
virtual | ~BoundedVerifier ()
| Destructor.
bool | isValid (const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal 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

## Detailed Description

### template<class T>
class BoundedVerifier< T >

Author:
  CTDay

Definition at line 70 of file PropertyVerifier.h.

## Constructor & Destructor Documentation

template<class T>

BoundedVerifier< T >::BoundedVerifier | ( |  | ) | `[inline]`

Constructors.

Definition at line 73 of file PropertyVerifier.h.

    00074     : m_hasLowerBound( false ),
    00075       m_hasUpperBound( false ),
    00076       m_lowerBound( T() ),
    00077       m_upperBound( T() ) { }

template<class T>

virtual BoundedVerifier< T >::~BoundedVerifier | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 80 of file PropertyVerifier.h.

    00080 { }

## Member Function Documentation

template<class T>

bool BoundedVerifier< T >::isValid | ( | const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal | value | ) | const`[inline, virtual]`

Check if the value is within bounds.

Implements PropertyVerifier< T >.

Definition at line 83 of file PropertyVerifier.h.

    00084   {
    00085     return
    00086       (( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true ) &&
    00087       (( m_hasUpperBound && ( *value > m_upperBound ) ) ? false : true )  ;
    00088   }

template<class T>

bool BoundedVerifier< T >::hasLower | ( |  | ) | const`[inline]`

Return if it has a lower bound.

Definition at line 91 of file PropertyVerifier.h.

    00091 { return m_hasLowerBound; }

template<class T>

bool BoundedVerifier< T >::hasUpper | ( |  | ) | const`[inline]`

Return if it has a lower bound.

Definition at line 93 of file PropertyVerifier.h.

    00093 { return m_hasUpperBound; }

template<class T>

const T& BoundedVerifier< T >::lower | ( |  | ) | const`[inline]`

Return the lower bound value.

Definition at line 95 of file PropertyVerifier.h.

    00095 { return m_lowerBound; }

template<class T>

const T& BoundedVerifier< T >::upper | ( |  | ) | const`[inline]`

Return the upper bound value.

Definition at line 97 of file PropertyVerifier.h.

    00097 { return m_upperBound; }

template<class T>

void BoundedVerifier< T >::setLower | ( | const T & | value | ) | `[inline]`

Set lower bound value.

Definition at line 100 of file PropertyVerifier.h.

    00100 { m_hasLowerBound = true; m_lowerBound = value; }

template<class T>

void BoundedVerifier< T >::setUpper | ( | const T & | value | ) | `[inline]`

Set upper bound value.

Definition at line 102 of file PropertyVerifier.h.

    00102 { m_hasUpperBound = true; m_upperBound = value; }

template<class T>

void BoundedVerifier< T >::clearLower | ( |  | ) | `[inline]`

Clear lower bound value.

Definition at line 104 of file PropertyVerifier.h.

    00104 { m_hasLowerBound = false; m_lowerBound = T(); }

template<class T>

void BoundedVerifier< T >::clearUpper | ( |  | ) | `[inline]`

Clear upper bound value.

Definition at line 106 of file PropertyVerifier.h.

    00106 { m_hasUpperBound = false; m_upperBound = T(); }

template<class T>

void BoundedVerifier< T >::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.

    00110   {
    00111     setLower( lower );
    00112     setUpper( upper );
    00113   }

template<class T>

void BoundedVerifier< T >::clearBounds | ( |  | ) | `[inline]`

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

Definition at line 116 of file PropertyVerifier.h.

    00117   {
    00118     clearLower();
    00119     clearUpper();
    00120   }

template<>

bool BoundedVerifier< Gaudi::Histo1DDef >::isValid | ( | const Gaudi::Histo1DDef * | value | ) | const`[inline]`

Author:
  Vanya BELYAEV ibelyaev@physics.syr.edu

Date:
  2007-09-18

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 }

## Member Data Documentation

template<class T>

bool BoundedVerifier< T >::m_hasLowerBound`[private]`

Data and Function Members for This Class Implementation.

Data members

Definition at line 125 of file PropertyVerifier.h.

template<class T>

bool BoundedVerifier< T >::m_hasUpperBound`[private]`

Definition at line 126 of file PropertyVerifier.h.

template<class T>

T BoundedVerifier< T >::m_lowerBound`[private]`

Definition at line 127 of file PropertyVerifier.h.

template<class T>

T BoundedVerifier< T >::m_upperBound`[private]`

Definition at line 128 of file PropertyVerifier.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiKernel/GaudiKernel/PropertyVerifier.h