103 template<
typename UnderlyingType,
typename Unit>
106 template<
typename Clock,
typename Duration>
128 : m_min{ std::move(
min) }
130 min <=
max ?
max : throw std::invalid_argument{
"Range is expected to have min <= max" }) }
134 constexpr const T &
min()
const
140 constexpr const T &
max()
const
152 return value >= m_min && value <= m_max;
158 return m_min == other.m_min && m_max == other.m_max;
170 using Zivid::Detail::operator<<;
171 std::ostringstream stream;
172 stream <<
"{ " << m_min <<
", " << m_max <<
" }";
173 return std::move(stream).str();
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:101
Class describing a range of values for a given type T
Definition: Range.h:118
constexpr const T & min() const
Get the minimum value of the range
Definition: Range.h:134
bool operator!=(const Range< T > &other) const
Comparison operator
Definition: Range.h:162
constexpr Range(T min, T max)
Constructor
Definition: Range.h:127
constexpr bool isInRange(const T &value) const
Check if the value is in range
Definition: Range.h:150
bool operator==(const Range< T > &other) const
Comparison operator
Definition: Range.h:156
std::string toString() const
Get the range as string
Definition: Range.h:168
T Type
Underlying type
Definition: Range.h:121
constexpr const T & max() const
Get the maximum value of the range
Definition: Range.h:140
constexpr Range()=default
Default constructor
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99
std::ostream & operator<<(std::ostream &stream, const Array2D< T > &array)
Serialize array information to a stream
Definition: Array2D.h:243