IDSpeakIPL  v1.8.0
peak::ipl::Range< T > Class Template Reference

Range support and convenience class. More...

#include <peak_ipl/types/peak_ipl_range.hpp>

Public Member Functions

constexpr Range (T min, T max, T inc)
 Constructor for the Range. More...
 
PEAK_IPL_NO_DISCARD constexpr T Minimum () const
 Get the minimum value for the range. More...
 
PEAK_IPL_NO_DISCARD constexpr T Maximum () const
 Get the maximum value for the range. More...
 
PEAK_IPL_NO_DISCARD constexpr T Increment () const
 Get the increment value for the range. More...
 
PEAK_IPL_NO_DISCARD constexpr std::tuple< T, T, T > GetRange () const
 Get the range as tuple. More...
 
PEAK_IPL_NO_DISCARD constexpr bool InRange (T value) const
 Check if the value is in range. More...
 

Detailed Description

template<typename T>
class peak::ipl::Range< T >

Range support and convenience class.

Constructor & Destructor Documentation

◆ Range()

template<typename T >
constexpr peak::ipl::Range< T >::Range ( T  min,
T  max,
T  inc 
)
inline

Constructor for the Range.

Parameters
minThe minimum value for the range.
maxThe minimum value for the range.
incThe increment value for the range.
Exceptions
InvalidArgumentException

Member Function Documentation

◆ GetRange()

template<typename T >
PEAK_IPL_NO_DISCARD constexpr std::tuple<T, T, T> peak::ipl::Range< T >::GetRange ( ) const
inline

Get the range as tuple.

Returns
the Range as tuple with <minimum, maximum, increment> in that order.

◆ Increment()

template<typename T >
PEAK_IPL_NO_DISCARD constexpr T peak::ipl::Range< T >::Increment ( ) const
inline

Get the increment value for the range.

Returns
the increment value.

◆ InRange()

template<typename T >
PEAK_IPL_NO_DISCARD constexpr bool peak::ipl::Range< T >::InRange ( T  value) const
inline

Check if the value is in range.

Parameters
valueThe value to check.
Returns
true if in range, false otherwise.

◆ Maximum()

template<typename T >
PEAK_IPL_NO_DISCARD constexpr T peak::ipl::Range< T >::Maximum ( ) const
inline

Get the maximum value for the range.

Returns
the maximum value.

◆ Minimum()

template<typename T >
PEAK_IPL_NO_DISCARD constexpr T peak::ipl::Range< T >::Minimum ( ) const
inline

Get the minimum value for the range.

Returns
the minimum value.

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