Dataflow Runtime API  3.1.1.0
Public Member Functions | List of all members
imt::base::core::util::Range< ValueType > Class Template Reference

A range of values limited by an lower and upper value that is included in the range. More...

#include <Imt.Base.Core.Util/Range.h>

Public Member Functions

 Range (const ValueType &lowerThreshold, const ValueType &upperThreshold)
 Constructor. More...
 
 Range (const Range &other)
 Copy constructor. More...
 
virtual ~Range (void)
 Destructor. More...
 
bool isInRange (const ValueType &value) const
 Returns true if the given value is inside the range. More...
 
bool isAbove (const ValueType &value) const
 Returns true if the given value is above the upper threshold of the range. More...
 
bool isBelow (const ValueType &value) const
 Returns true if the given value is below the lower threshold of the range. More...
 
const ValueType & getLowerThreshold (void) const
 Returns the lower threshold. More...
 
const ValueType & getUpperThreshold (void) const
 Returns the upper threshold. More...
 
ValueType truncateValue (const ValueType &value) const
 Truncates the value to the range. More...
 

Detailed Description

template<typename ValueType>
class imt::base::core::util::Range< ValueType >

A range of values limited by an lower and upper value that is included in the range.

Constructor & Destructor Documentation

◆ Range() [1/2]

template<typename ValueType >
imt::base::core::util::Range< ValueType >::Range ( const ValueType &  lowerThreshold,
const ValueType &  upperThreshold 
)
explicit

Constructor.

The thresholds are part of the range.

Parameters
lowerThresholdLower threshold of the range.
upperThresholdUpper threshold of the range.

◆ Range() [2/2]

template<typename ValueType >
imt::base::core::util::Range< ValueType >::Range ( const Range< ValueType > &  other)

Copy constructor.

Parameters
otherOther range to copy.

◆ ~Range()

template<typename ValueType >
imt::base::core::util::Range< ValueType >::~Range ( void  )
virtual

Destructor.

Member Function Documentation

◆ getLowerThreshold()

template<typename ValueType >
const ValueType & imt::base::core::util::Range< ValueType >::getLowerThreshold ( void  ) const

Returns the lower threshold.

Returns
Reference to the lower threshold.

◆ getUpperThreshold()

template<typename ValueType >
const ValueType & imt::base::core::util::Range< ValueType >::getUpperThreshold ( void  ) const

Returns the upper threshold.

Returns
Reference to the upper threshold.

◆ isAbove()

template<typename ValueType >
bool imt::base::core::util::Range< ValueType >::isAbove ( const ValueType &  value) const

Returns true if the given value is above the upper threshold of the range.

Parameters
valueValue to test.
Returns
True if the given value is above the upper threshold of the range.

◆ isBelow()

template<typename ValueType >
bool imt::base::core::util::Range< ValueType >::isBelow ( const ValueType &  value) const

Returns true if the given value is below the lower threshold of the range.

Parameters
valueValue to test.
Returns
True if the given value is below the lower threshold of the range.

◆ isInRange()

template<typename ValueType >
bool imt::base::core::util::Range< ValueType >::isInRange ( const ValueType &  value) const

Returns true if the given value is inside the range.

Parameters
valueValue to test.
Returns
True if the given value is inside the range.

◆ truncateValue()

template<typename ValueType >
ValueType imt::base::core::util::Range< ValueType >::truncateValue ( const ValueType &  value) const

Truncates the value to the range.

Parameters
valueThe value to truncate.
Returns
Return the truncated value.

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