| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# BoundedVerifier< T[N]> Class Template Reference

specialization of Bounded verifier for for C-arrays More...

`#include <CArrayAsProperty.h>`

Inheritance diagram for BoundedVerifier< T[N]>:

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

[legend]

List of all members.

## Public Member Functions
| BoundedVerifier ()
| Constructors.
virtual | ~BoundedVerifier ()
| Destructor.
bool | isValid (const typename Traits::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.
Traits::CRef | lower () const
| Return the lower bound value.
Traits::CRef | upper () const
| Return the upper bound value.
void | setLower (typename Traits::CRef value)
| Set lower bound value.
void | setUpper (typename Traits::CRef value)
| Set upper bound value.
void | clearLower ()
| Clear lower bound value.
void | clearUpper ()
| Clear upper bound value.
void | setBounds (typename Traits::CRef lower, typename Traits::CRef upper)
| Set both bounds (lower and upper) at the same time.
void | clearBounds ()
| Clear both bounds (lower and upper) at the same time.
## Private Types
typedef Gaudi::Utils::PropertyTypeTraits < T[N]> | Traits
## Private Attributes
bool | m_hasLowerBound
| Data and Function Members for This Class Implementation.
bool | m_hasUpperBound
const T | m_lowerBound [N]
const T | m_upperBound [N]

## Detailed Description

### template<class T, unsigned int N>
class BoundedVerifier< T[N]>

specialization of Bounded verifier for for C-arrays

Definition at line 113 of file CArrayAsProperty.h.

## Member Typedef Documentation

template<class T, unsigned int N>

typedef Gaudi::Utils::PropertyTypeTraits<T[N]> BoundedVerifier< T[N]>::Traits`[private]`

Definition at line 116 of file CArrayAsProperty.h.

## Constructor & Destructor Documentation

template<class T, unsigned int N>

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

Constructors.

Definition at line 121 of file CArrayAsProperty.h.

    00122     : m_hasLowerBound ( false )
    00123     , m_hasUpperBound ( false )
    00124   {}

template<class T, unsigned int N>

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

Destructor.

Definition at line 126 of file CArrayAsProperty.h.

    00126 { }

## Member Function Documentation

template<class T, unsigned int N>

bool BoundedVerifier< T[N]>::isValid | ( | const typename Traits::CVal | value | ) | const`[inline]`

Check if the value is within bounds.

Definition at line 129 of file CArrayAsProperty.h.

    00130   {
    00131     return
    00132       ( ( m_hasLowerBound && Traits::less ( *value , m_lowerBound ) ) ? false : true )
    00133       &&
    00134       ( ( m_hasUpperBound && Traits::less ( m_upperBound , *value ) ) ? false : true ) ;
    00135   }

template<class T, unsigned int N>

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

Return if it has a lower bound.

Definition at line 137 of file CArrayAsProperty.h.

    00137 { return m_hasLowerBound; }

template<class T, unsigned int N>

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

Return if it has a lower bound.

Definition at line 139 of file CArrayAsProperty.h.

    00139 { return m_hasUpperBound; }

template<class T, unsigned int N>

Traits::CRef BoundedVerifier< T[N]>::lower | ( |  | ) | const`[inline]`

Return the lower bound value.

Definition at line 141 of file CArrayAsProperty.h.

    00141 { return m_lowerBound; }

template<class T, unsigned int N>

Traits::CRef BoundedVerifier< T[N]>::upper | ( |  | ) | const`[inline]`

Return the upper bound value.

Definition at line 143 of file CArrayAsProperty.h.

    00143 { return m_upperBound; }

template<class T, unsigned int N>

void BoundedVerifier< T[N]>::setLower | ( | typename Traits::CRef | value | ) | `[inline]`

Set lower bound value.

Definition at line 146 of file CArrayAsProperty.h.

    00146 { m_hasLowerBound = true; Traits::assign ( m_lowerBound , value ) ; }

template<class T, unsigned int N>

void BoundedVerifier< T[N]>::setUpper | ( | typename Traits::CRef | value | ) | `[inline]`

Set upper bound value.

Definition at line 148 of file CArrayAsProperty.h.

    00148 { m_hasUpperBound = true; Traits::assign ( m_upperBound , value ) ; }

template<class T, unsigned int N>

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

Clear lower bound value.

Definition at line 150 of file CArrayAsProperty.h.

    00150 { m_hasLowerBound = false; }

template<class T, unsigned int N>

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

Clear upper bound value.

Definition at line 152 of file CArrayAsProperty.h.

    00152 { m_hasUpperBound = false; }

template<class T, unsigned int N>

void BoundedVerifier< T[N]>::setBounds | ( | typename Traits::CRef | lower,
|  | typename Traits::CRef | upper |
| ) |  |  | `[inline]`

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

Definition at line 155 of file CArrayAsProperty.h.

    00156     {
    00157       setLower( lower );
    00158       setUpper( upper );
    00159   }

template<class T, unsigned int N>

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

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

Definition at line 162 of file CArrayAsProperty.h.

    00163     {
    00164       clearLower();
    00165       clearUpper();
    00166     }

## Member Data Documentation

template<class T, unsigned int N>

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

Data and Function Members for This Class Implementation.

Data members

Definition at line 172 of file CArrayAsProperty.h.

template<class T, unsigned int N>

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

Definition at line 173 of file CArrayAsProperty.h.

template<class T, unsigned int N>

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

Definition at line 174 of file CArrayAsProperty.h.

template<class T, unsigned int N>

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

Definition at line 175 of file CArrayAsProperty.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7/GaudiKernel/GaudiKernel/CArrayAsProperty.h