| The Gaudi Framework v28r2p1 (f1a77ff4)

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

229 {
230 clearLower();
231 clearUpper();
232 }
Gaudi::Details::Property::BoundedVerifier::clearUpper
void clearUpper()
Clear upper bound value.
Definition: Property.h:214
Gaudi::Details::Property::BoundedVerifier::clearLower
void clearLower()
Clear lower bound value.
Definition: Property.h:208
template<class TYPE >

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

Clear lower bound value.

Definition at line 208 of file Property.h.

209 {
210 m_hasLowerBound = false;
211 m_lowerBound = TYPE();
212 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:236
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:238
template<class TYPE >

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

Clear upper bound value.

Definition at line 214 of file Property.h.

215 {
216 m_hasUpperBound = false;
217 m_upperBound = TYPE();
218 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:237
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:239
template<class TYPE >

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

Return if it has a lower bound.

Definition at line 187 of file Property.h.

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

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

Return if it has a lower bound.

Definition at line 189 of file Property.h.

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

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

Return the lower bound value.

Definition at line 191 of file Property.h.

191 { return m_lowerBound; }
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:238
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:236
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:238
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:237
Gaudi::Histo1DDef::ok
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:100
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:239
template<class TYPE >

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

Definition at line 179 of file Property.h.

180 {
181 // throw the exception if the limit is defined and value is outside
182 if ( ( m_hasLowerBound && ( value < m_lowerBound ) ) || ( m_hasUpperBound && ( m_upperBound < value ) ) )
183 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" );
184 }
std::out_of_range
STL class.
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:236
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:238
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:237
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:239
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 221 of file Property.h.

222 {
223 setLower( lower );
224 setUpper( upper );
225 }
Gaudi::Details::Property::BoundedVerifier::upper
const TYPE & upper() const
Return the upper bound value.
Definition: Property.h:193
Gaudi::Details::Property::BoundedVerifier::setLower
void setLower(const TYPE &value)
Set lower bound value.
Definition: Property.h:196
Gaudi::Details::Property::BoundedVerifier::lower
const TYPE & lower() const
Return the lower bound value.
Definition: Property.h:191
Gaudi::Details::Property::BoundedVerifier::setUpper
void setUpper(const TYPE &value)
Set upper bound value.
Definition: Property.h:202
template<class TYPE >

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

Set lower bound value.

Definition at line 196 of file Property.h.

197 {
198 m_hasLowerBound = true;
199 m_lowerBound = value;
200 }
Gaudi::Details::Property::BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data members.
Definition: Property.h:236
Gaudi::Details::Property::BoundedVerifier::m_lowerBound
TYPE m_lowerBound
Definition: Property.h:238
template<class TYPE >

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

Set upper bound value.

Definition at line 202 of file Property.h.

203 {
204 m_hasUpperBound = true;
205 m_upperBound = value;
206 }
Gaudi::Details::Property::BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: Property.h:237
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:239
template<class TYPE >

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

Return the upper bound value.

Definition at line 193 of file Property.h.

193 { return m_upperBound; }
Gaudi::Details::Property::BoundedVerifier::m_upperBound
TYPE m_upperBound
Definition: Property.h:239

## Member Data Documentation

template<class TYPE >

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

Data members.

Definition at line 236 of file Property.h.

template<class TYPE >

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

Definition at line 237 of file Property.h.

template<class TYPE >

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

Definition at line 238 of file Property.h.

template<class TYPE >

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

Definition at line 239 of file Property.h.

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

- GaudiKernel/GaudiKernel/Property.h