The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Details::Property::BoundedVerifier< TYPE > Struct Template Reference

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Details/Property.h>

Public Member Functions

void operator() (const TYPE &value) const
bool hasLower () const
 Return if it has a lower bound.
bool hasUpper () const
 Return if it has a lower bound.
const TYPE & lower () const
 Return the lower bound value.
const TYPE & upper () const
 Return the upper bound value.
void setLower (const TYPE &value)
 Set lower bound value.
void setUpper (const TYPE &value)
 Set upper bound value.
void clearLower ()
 Clear lower bound value.
void clearUpper ()
 Clear upper bound value.
void setBounds (const TYPE &lower, const TYPE &upper)
 Set both bounds (lower and upper) at the same time.
void clearBounds ()
 Clear both bounds (lower and upper) at the same time.
void operator() (const Gaudi::Histo1DDef &value) const
 Check if the value is OK it is a nesessary template specialisation to avoid the compilation error.

Private Attributes

bool m_hasLowerBound { false }
 Data members.
bool m_hasUpperBound { false }
TYPE m_lowerBound {}
TYPE m_upperBound {}

Detailed Description

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

Definition at line 111 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 156 of file Property.h.

156 {
157 clearLower();
158 clearUpper();
159 }
void clearLower()
Clear lower bound value.
Definition Property.h:139
void clearUpper()
Clear upper bound value.
Definition Property.h:144

◆ clearLower()

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

Clear lower bound value.

Definition at line 139 of file Property.h.

◆ clearUpper()

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

Clear upper bound value.

Definition at line 144 of file Property.h.

◆ hasLower()

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

Return if it has a lower bound.

Definition at line 120 of file Property.h.

120{ return m_hasLowerBound; }

◆ hasUpper()

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

Return if it has a lower bound.

Definition at line 122 of file Property.h.

122{ return m_hasUpperBound; }

◆ lower()

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

Return the lower bound value.

Definition at line 124 of file Property.h.

124{ return m_lowerBound; }

◆ operator()() [1/2]

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

25 {
26 if ( !value.ok() || ( m_hasLowerBound && ( value < m_lowerBound ) ) ||
28 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" );
29 }

◆ operator()() [2/2]

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

Definition at line 112 of file Property.h.

112 {
114 // throw the exception if the limit is defined and value is outside
115 if ( ( m_hasLowerBound && ( value < m_lowerBound ) ) || ( m_hasUpperBound && ( m_upperBound < value ) ) )
116 throw std::out_of_range( "value " + toString( value ) + " outside range" );
117 }

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

150 {
151 setLower( lower );
152 setUpper( upper );
153 }
const TYPE & lower() const
Return the lower bound value.
Definition Property.h:124
void setUpper(const TYPE &value)
Set upper bound value.
Definition Property.h:134
void setLower(const TYPE &value)
Set lower bound value.
Definition Property.h:129
const TYPE & upper() const
Return the upper bound value.
Definition Property.h:126

◆ setLower()

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

Set lower bound value.

Definition at line 129 of file Property.h.

129 {
130 m_hasLowerBound = true;
132 }

◆ setUpper()

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

Set upper bound value.

Definition at line 134 of file Property.h.

134 {
135 m_hasUpperBound = true;
137 }

◆ upper()

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

Return the upper bound value.

Definition at line 126 of file Property.h.

126{ return m_upperBound; }

Member Data Documentation

◆ m_hasLowerBound

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

Data members.

Definition at line 163 of file Property.h.

163{ false };

◆ m_hasUpperBound

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

Definition at line 164 of file Property.h.

164{ false };

◆ m_lowerBound

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

Definition at line 165 of file Property.h.

165{};

◆ m_upperBound

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

Definition at line 166 of file Property.h.

166{};

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