| The Gaudi Framework v32r1 (f65d50dc)

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 228 of file Property.h.

## Member Function Documentation

## ◆ clearBounds()

template<class TYPE >

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

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

Definition at line 273 of file Property.h.

273 {
274 clearLower();
275 clearUpper();
276 }
Gaudi::Details::Property::BoundedVerifier::clearUpper
void clearUpper()
Clear upper bound value.
Definition: Property.h:261
Gaudi::Details::Property::BoundedVerifier::clearLower
void clearLower()
Clear lower bound value.
Definition: Property.h:256

## ◆ clearLower()

template<class TYPE >

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

Clear lower bound value.

Definition at line 256 of file Property.h.

256 {
257 m_hasLowerBound = false;
258 m_lowerBound = TYPE();
259 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:280
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:282

## ◆ clearUpper()

template<class TYPE >

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

Clear upper bound value.

Definition at line 261 of file Property.h.

261 {
262 m_hasUpperBound = false;
263 m_upperBound = TYPE();
264 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:281
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:283

## ◆ hasLower()

template<class TYPE >

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

Return if it has a lower bound.

Definition at line 237 of file Property.h.

237 { return m_hasLowerBound; }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:280

## ◆ hasUpper()

template<class TYPE >

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

Return if it has a lower bound.

Definition at line 239 of file Property.h.

239 { return m_hasUpperBound; }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:281

## ◆ lower()

template<class TYPE >

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

Return the lower bound value.

Definition at line 241 of file Property.h.

241 { return m_lowerBound; }
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:282

## ◆ operator()() [1/2]

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

20 {
21 if ( !value.ok() || ( m_hasLowerBound && ( value < m_lowerBound ) ) ||
22 ( m_hasUpperBound && ( m_upperBound < value ) ) )
23 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" );
24 }
std::out_of_range
STL class.
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:280
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:282
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:281
Gaudi::Histo1DDef::ok
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:92
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:283

## ◆ operator()() [2/2]

template<class TYPE >

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

Definition at line 229 of file Property.h.

229 {
230 using Gaudi::Utils::toString;
231 // throw the exception if the limit is defined and value is outside
232 if ( ( m_hasLowerBound && ( value < m_lowerBound ) ) || ( m_hasUpperBound && ( m_upperBound < value ) ) )
233 throw std::out_of_range( "value " + toString( value ) + " outside range" );
234 }
std::out_of_range
STL class.
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:280
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:282
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:281
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:283

## ◆ setBounds()

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 267 of file Property.h.

267 {
268 setLower( lower );
269 setUpper( upper );
270 }
Gaudi::Details::Property::BoundedVerifier::upper
const TYPE & upper() const
Return the upper bound value.
Definition: Property.h:243
Gaudi::Details::Property::BoundedVerifier::setLower
void setLower(const TYPE &value)
Set lower bound value.
Definition: Property.h:246
Gaudi::Details::Property::BoundedVerifier::lower
const TYPE & lower() const
Return the lower bound value.
Definition: Property.h:241
Gaudi::Details::Property::BoundedVerifier::setUpper
void setUpper(const TYPE &value)
Set upper bound value.
Definition: Property.h:251

## ◆ setLower()

template<class TYPE >

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

Set lower bound value.

Definition at line 246 of file Property.h.

246 {
247 m_hasLowerBound = true;
248 m_lowerBound = value;
249 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:280
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:282

## ◆ setUpper()

template<class TYPE >

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

Set upper bound value.

Definition at line 251 of file Property.h.

251 {
252 m_hasUpperBound = true;
253 m_upperBound = value;
254 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:281
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:283

## ◆ upper()

template<class TYPE >

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

Return the upper bound value.

Definition at line 243 of file Property.h.

243 { return m_upperBound; }
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:283

## Member Data Documentation

## ◆ m_hasLowerBound

template<class TYPE >

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

Data members.

Definition at line 280 of file Property.h.

## ◆ m_hasUpperBound

template<class TYPE >

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

Definition at line 281 of file Property.h.

## ◆ m_lowerBound

template<class TYPE >

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

Definition at line 282 of file Property.h.

## ◆ m_upperBound

template<class TYPE >

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

Definition at line 283 of file Property.h.

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

- GaudiKernel/GaudiKernel/Property.h