oaRange Class Template Reference

Inheritance diagram for oaRange:

oaRangeBase oaIntRange oaUInt8Range


Public Methods

 oaRange ()
 oaRange (oaRangeType type, T value)
 oaRange (oaRangeType type, T lowerBoundIn, T upperBoundIn)
getLowerBound () const
getUpperBound () const
void setLowerBound (T lowerBoundIn)
void setUpperBound (T upperBoundIn)
void setBounds (T lowerBoundIn, T upperBoundIn)
oaBoolean isInRange (const T &value) const
oaBoolean operator== (const oaRange< T > &range) const
oaBoolean operator!= (const oaRange< T > &range) const

Friends

class oaChecker< oaIntRange >
class oaChecker< oaUInt8Range >

Detailed Description

template<class T>
class oaRange< T >

Instantiations of this template class are used to define numerical ranges for different types.


Constructor & Destructor Documentation

template<class T>
oaRange< T >::oaRange   [inline]
 

This is the default constructor for the oaRange class.

template<class T>
oaRange< T >::oaRange oaRangeType    type,
T    value
[inline]
 

This oaRange constructor creates a range object that has either lower bound or upper bound.

Parameters:
type The oaRangeType of range object to construct.
value The upper bound or lower bound based on the type.

template<class T>
oaRange< T >::oaRange oaRangeType    type,
T    lowerBoundIn,
T    upperBoundIn
[inline]
 

This oaRange constructor creates a range object that has both lower and upper bounds.

Parameters:
type The oaRangeType of range object to construct.
lowerBoundIn The lower bound to set on this range object.
upperBoundIn The upper bound to set on this range object.


Member Function Documentation

template<class T>
T oaRange< T >::getLowerBound   const [inline]
 

This function returns the lower bound of this range object. If the bound is not applicable for the range object, an oacInvalidBoundForRange exception is thrown.

Exceptions:
oacInvalidBoundForRange 

template<class T>
T oaRange< T >::getUpperBound   const [inline]
 

This function returns the upper bound of this range object. If the bound is not applicable for the range object, an oacInvalidBoundForRange exception is thrown.

Exceptions:
oacInvalidBoundForRange 

template<class T>
oaBoolean oaRange< T >::isInRange const T &    value const
 

This function returns a boolean indicating whether or not the specified value lies in the range of this object.

Parameters:
value input value to test

template<class T>
oaBoolean oaRange< T >::operator!= const oaRange< T > &    range const [inline]
 

This function returns a boolean indicating whether or not this object is not equal to the specified oaRange object.

Parameters:
range The oaRange object to compare to this object.

template<class T>
oaBoolean oaRange< T >::operator== const oaRange< T > &    range const [inline]
 

This function returns a boolean indicating whether or not this object is equal to the specified oaRange object.

Parameters:
range The oaRange object to compare to this object.

template<class T>
void oaRange< T >::setBounds T    lowerBoundIn,
T    upperBoundIn
 

This function sets the lower and upper bounds of this oaRange object.

Parameters:
lowerBoundIn The lower bound to set on this oaRange object.
upperBoundIn The upper bound to set on this oaRange object.
Exceptions:
oacInvalidBoundForRange 

template<class T>
void oaRange< T >::setLowerBound T    lowerBoundIn
 

This function sets the lower bound of this oaRange object.

Parameters:
lowerBoundIn The lower bound to set on this oaRange object.
Exceptions:
oacInvalidBoundForRange 

template<class T>
void oaRange< T >::setUpperBound T    upperBoundIn
 

This function sets the upper bound of this oaRange object.

Parameters:
upperBoundIn The upper bound to set on this oaRange object
Exceptions:
oacInvalidBoundForRange 


Friends And Related Function Documentation

template<class T>
friend class oaChecker< oaIntRange > [friend]
 

Reimplemented from oaRangeBase.

template<class T>
friend class oaChecker< oaUInt8Range > [friend]
 

Reimplemented from oaRangeBase.


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

Return to top of page