47 static_assert(std::is_arithmetic<T>::value,
"Template argument of Interval must be arithmetic.");
63 constexpr RangeT(T minimum, T maximum, T increment)
65 , m_increment{ increment }
67 if (increment > maximum - minimum)
110 return !(rhs == *
this);
135 std::ostringstream ss;
143 friend detail::BackendAccessor<RangeT<T>>;
145 template <
typename U = T,
typename std::enable_if<has_c_type_of<RangeT<U>>::value,
bool>::type = false>
147 :
RangeT<U>(range.minimum, range.maximum, range.increment)
150 template <
typename U = T,
typename std::enable_if<has_c_type_of<RangeT<U>>::value,
bool>::type = false>
151 constexpr explicit operator detail::c_type_of_t<RangeT<U>>()
const
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:58
Represents a continuous numeric interval with inclusive lower and upper bounds.
Definition peak_common_interval.hpp:44
constexpr IntervalT(uint32_t minimum, uint32_t maximum)
Definition peak_common_interval.hpp:61
PEAK_COMMON_NO_DISCARD constexpr T GetMaximum() const
Returns the upper boundary of the interval.
Definition peak_common_interval.hpp:88
constexpr bool operator==(const IntervalT< H > &rhs) const
Compares two intervals for equality (integral types).
Definition peak_common_interval.hpp:109
PEAK_COMMON_NO_DISCARD constexpr T GetMinimum() const
Returns the lower boundary of the interval.
Definition peak_common_interval.hpp:77
Represents a numeric range with defined boundaries and a fixed increment.
Definition peak_common_range.hpp:44
constexpr bool operator==(const RangeT &rhs) const
Compares this range with another for equality.
Definition peak_common_range.hpp:95
constexpr RangeT(T minimum, T maximum, T increment)
Constructs a range with specified minimum, maximum, and increment values.
Definition peak_common_range.hpp:63
T type
Definition peak_common_range.hpp:49
PEAK_COMMON_NO_DISCARD constexpr T GetIncrement() const
Retrieves the increment value associated with this range.
Definition peak_common_range.hpp:80
constexpr bool operator!=(const RangeT &rhs) const
Compares this range with another for inequality.
Definition peak_common_range.hpp:108
PEAK_COMMON_NO_DISCARD std::string ToString() const
Returns a string representation of the range.
Definition peak_common_range.hpp:133
friend std::ostream & operator<<(std::ostream &os, RangeT range)
Outputs the range as a human-readable string to a stream.
Definition peak_common_range.hpp:121
detail::RangeT< uint32_t > RangeU
Alias for a range of 32-bit unsigned integers.
Definition peak_common_range.hpp:172
detail::RangeT< int32_t > Range
Alias for a range of 32-bit signed integers.
Definition peak_common_range.hpp:187
detail::RangeT< uint8_t > RangeU8
Alias for a range of 8-bit unsigned integers.
Definition peak_common_range.hpp:217
detail::RangeT< float > RangeF
Alias for a range of 32-bit floating-point numbers.
Definition peak_common_range.hpp:202
Namespace for internal implementation details and low-level types.
Definition peak_common_math.hpp:24
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:35
#define PEAK_COMMON_NO_DISCARD
Definition peak_common_defines.h:94