| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
Gaudi::Details::Property::BoundedVerifier< TYPE > Struct Template Reference

`#include <GaudiKernel/Property.h>`

Collaboration diagram for Gaudi::Details::Property::BoundedVerifier< TYPE >:
[legend]

## Public Member Functions
void | operator() (const TYPE &value) const
bool | hasLower () const
| Return if it has a lower bound. More...
bool | hasUpper () const
| Return if it has a lower bound. More...
const TYPE & | lower () const
| Return the lower bound value. More...
const TYPE & | upper () const
| Return the upper bound value. More...
void | setLower (const TYPE &value)
| Set lower bound value. More...
void | setUpper (const TYPE &value)
| Set upper bound value. More...
void | clearLower ()
| Clear lower bound value. More...
void | clearUpper ()
| Clear upper bound value. More...
void | setBounds (const TYPE &lower, const TYPE &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<>
void | operator() (const Gaudi::Histo1DDef &value) const
| Check if the value is OK it is a nesessary template specialisation to avoid the compilation error. More...

## Private Attributes
bool | m_hasLowerBound {false}
| Data members. More...
bool | m_hasUpperBound {false}
TYPE | m_lowerBound {}
TYPE | m_upperBound {}

## Detailed Description

### template<class TYPE>
struct Gaudi::Details::Property::BoundedVerifier< TYPE >

Definition at line 182 of file Property.h.

## Member Function Documentation

template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::clearBounds | ( |  | ) |
| inline

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

Definition at line 233 of file Property.h.

234 {
235 clearLower();
236 clearUpper();
237 }
Gaudi::Details::Property::BoundedVerifier::clearUpper
void clearUpper()
Clear upper bound value.
Definition: Property.h:219
Gaudi::Details::Property::BoundedVerifier::clearLower
void clearLower()
Clear lower bound value.
Definition: Property.h:213
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::clearLower | ( |  | ) |
| inline

Clear lower bound value.

Definition at line 213 of file Property.h.

214 {
215 m_hasLowerBound = false;
216 m_lowerBound = TYPE();
217 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:241
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:243
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::clearUpper | ( |  | ) |
| inline

Clear upper bound value.

Definition at line 219 of file Property.h.

220 {
221 m_hasUpperBound = false;
222 m_upperBound = TYPE();
223 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:242
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:244
template<class TYPE >

bool Gaudi::Details::Property::BoundedVerifier< TYPE >::hasLower | ( |  | ) | const
| inline

Return if it has a lower bound.

Definition at line 192 of file Property.h.

192 { return m_hasLowerBound; }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:241
template<class TYPE >

bool Gaudi::Details::Property::BoundedVerifier< TYPE >::hasUpper | ( |  | ) | const
| inline

Return if it has a lower bound.

Definition at line 194 of file Property.h.

194 { return m_hasUpperBound; }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:242
template<class TYPE >

const TYPE& Gaudi::Details::Property::BoundedVerifier< TYPE >::lower | ( |  | ) | const
| inline

Return the lower bound value.

Definition at line 196 of file Property.h.

196 { return m_lowerBound; }
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:243
template<>

void Gaudi::Details::Property::BoundedVerifier< Gaudi::Histo1DDef >::operator() | ( | const Gaudi::Histo1DDef & | value | ) | const
| inline

Check if the value is OK it is a nesessary template specialisation to avoid the compilation error.

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 23 of file HistoProperty.h.

24 {
25 if ( !value.ok() || ( m_hasLowerBound && ( value < m_lowerBound ) ) ||
26 ( m_hasUpperBound && ( m_upperBound < value ) ) )
27 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" );
28 }
std::out_of_range
STL class.
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:241
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:346
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:243
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:242
Gaudi::Histo1DDef::ok
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:95
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:244
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::operator() | ( | const TYPE & | value | ) | const
| inline

Definition at line 183 of file Property.h.

184 {
185 using Gaudi::Utils::toString;
186 // throw the exception if the limit is defined and value is outside
187 if ( ( m_hasLowerBound && ( value < m_lowerBound ) ) || ( m_hasUpperBound && ( m_upperBound < value ) ) )
188 throw std::out_of_range( "value " + toString( value ) + " outside range" );
189 }
std::out_of_range
STL class.
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:241
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:346
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:243
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:242
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:244
GaudiMath::Interpolation::toString
std::string toString(const Type &)
Definition: Interpolation.cpp:42
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::setBounds | ( | const TYPE & | lower,
|  | const TYPE & | upper
| ) |  |
| inline

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

Definition at line 226 of file Property.h.

227 {
228 setLower( lower );
229 setUpper( upper );
230 }
Gaudi::Details::Property::BoundedVerifier::upper
const TYPE & upper() const
Return the upper bound value.
Definition: Property.h:198
Gaudi::Details::Property::BoundedVerifier::setLower
void setLower(const TYPE &value)
Set lower bound value.
Definition: Property.h:201
Gaudi::Details::Property::BoundedVerifier::lower
const TYPE & lower() const
Return the lower bound value.
Definition: Property.h:196
Gaudi::Details::Property::BoundedVerifier::setUpper
void setUpper(const TYPE &value)
Set upper bound value.
Definition: Property.h:207
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::setLower | ( | const TYPE & | value | ) |
| inline

Set lower bound value.

Definition at line 201 of file Property.h.

202 {
203 m_hasLowerBound = true;
204 m_lowerBound = value;
205 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:241
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:243
template<class TYPE >

void Gaudi::Details::Property::BoundedVerifier< TYPE >::setUpper | ( | const TYPE & | value | ) |
| inline

Set upper bound value.

Definition at line 207 of file Property.h.

208 {
209 m_hasUpperBound = true;
210 m_upperBound = value;
211 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:242
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:244
template<class TYPE >

const TYPE& Gaudi::Details::Property::BoundedVerifier< TYPE >::upper | ( |  | ) | const
| inline

Return the upper bound value.

Definition at line 198 of file Property.h.

198 { return m_upperBound; }
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:244

## Member Data Documentation

template<class TYPE >

bool Gaudi::Details::Property::BoundedVerifier< TYPE >::m_hasLowerBound {false}
| private

Data members.

Definition at line 241 of file Property.h.

template<class TYPE >

bool Gaudi::Details::Property::BoundedVerifier< TYPE >::m_hasUpperBound {false}
| private

Definition at line 242 of file Property.h.

template<class TYPE >

TYPE Gaudi::Details::Property::BoundedVerifier< TYPE >::m_lowerBound {}
| private

Definition at line 243 of file Property.h.

template<class TYPE >

TYPE Gaudi::Details::Property::BoundedVerifier< TYPE >::m_upperBound {}
| private

Definition at line 244 of file Property.h.

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

- GaudiKernel/GaudiKernel/Property.h