87 explicit Range(T
const mini, T
const maxi);
108 template <
typename U>
143 template <
typename T>
148 template <
typename T>
153 template <
typename T>
168 template <
typename T>
173 template <
typename T>
178 template <
typename T>
183 template <
typename T>
188 template <
typename T>
193 template <
typename T>
198 template <
typename T>
203 template <
typename T>
208 template <
typename T>
213 template <
typename T>
218 template <
typename T>
223 template <
typename T>
228 template <
typename T>
233 template <
typename T>
239#include <jevois/Types/details/RangeImpl.H>
Range< T > operator-(Range< T > const &range, T const &scalar)
Subtract constant from both ends of a range: Range<T> - T.
void paramValToString(Range< T > const &val, std::string &result)
Machine-readable output to a string, for use in jevois::Parameter: outputs min...max (e....
Range< T > & operator=(Range< T > const &other)=default
Assignment.
Range< T > operator*(T const &scalar, Range< T > const &range)
Multiply a factor by both ends of a range: T * Range<T>
Range()
Default constructor, range is [0 .. 0].
void paramStringToVal(std::string const &valstring, Range< T > &result)
Machine-readable input from a string, for use in jevois::Parameter: reads min...max (e....
Range< T > operator+(T const &scalar, Range< T > const &range)
Add constant to both ends of a range: T + Range<T>
Range(Range< T > const &other)=default
Copy constructor.
Range(Range< T > &&other)=default
Move constructor.
Range< T > & operator=(Range< T > &&other)=default
Move assignment.
bool empty() const
Return whether min() == max()
Range< T > & operator/=(Range< T > &range, T const &scalar)
Divide both ends of a range by a factor: Range<T> /= T.
void extend(T const val)
Extend the range, if needed, so that it includes val.
T const & min() const
Return the minimum value.
Range< T > merge(Range< T > const &r1, Range< T > const &r2)
Merge two ranges.
bool operator!=(Range< T > const &range1, Range< T > const &range2)
Inequality test: Range<T> != Range<T>
Range(Range< U > const &other)
Copy-conversion constructor, uses jevois::clamped_convert<T,U> internally.
Range< T > operator*(Range< T > const &range, T const &scalar)
Multiply both ends of a range by a factor: Range<T> * T.
Range< T > & operator*=(Range< T > &range, T const &scalar)
Multiply both ends of a range by a factor: Range<T> *= T.
T const & max() const
Return the maximum value.
Range< T > operator+(Range< T > const &range, T const &scalar)
Add constant to both ends of a range: Range<T> + T.
Range< T > operator-(T const &scalar, Range< T > const &range)
Subtract constant from both ends of a range: T - Range<T>
Range< T > operator/(T const &scalar, Range< T > const &range)
Divide a factor by both ends of a range: T / Range<T>
bool operator==(Range< T > const &range1, Range< T > const &range2)
Equality test: Range<T> == Range<T>
std::ostream & operator<<(std::ostream &out, Range< T > const &r)
Stream out as "[min ... max]".
Range(T const mini, T const maxi)
Constructor.
Range< T > & operator+=(Range< T > &range, T const &scalar)
Add constant to both ends of a range: Range<T> += T.
bool contains(T const &val) const
Return true if val is within [min ... max].
Range< T > & operator-=(Range< T > &range, T const &scalar)
Subtract constant from both ends of a range: Range<T> -= T.
std::istream & operator>>(std::istream &in, Range< T > &r)
Stream in as "[min ... max]".
Range< T > operator/(Range< T > const &range, T const &scalar)
Divide both ends of a range by a factor: Range<T> / T.
Main namespace for all JeVois classes and functions.