Zivid C++ API 2.9.0+4dbba385-1
Defining the Future of 3D Machine Vision
Public Types | Public Member Functions | List of all members
Zivid::Range< T > Class Template Reference

Class describing a range of values for a given type T More...

#include <Zivid/Range.h>

Public Types

using Type = T
 Underlying type More...
 

Public Member Functions

constexpr Range ()=default
 Default constructor More...
 
constexpr Range (T min, T max)
 Constructor More...
 
constexpr const T & min () const
 Get the minimum value of the range More...
 
constexpr const T & max () const
 Get the maximum value of the range More...
 
constexpr bool isInRange (const T &value) const
 Check if the value is in range More...
 
bool operator== (const Range< T > &other) const
 Comparison operator More...
 
bool operator!= (const Range< T > &other) const
 Comparison operator More...
 
std::string toString () const
 Get the range as string More...
 

Detailed Description

template<typename T>
class Zivid::Range< T >

Class describing a range of values for a given type T

The range is inclusive, in other words both the minimum and maximum values are included in the range.

Member Typedef Documentation

◆ Type

template<typename T >
using Zivid::Range< T >::Type = T

Underlying type

Constructor & Destructor Documentation

◆ Range() [1/2]

template<typename T >
constexpr Zivid::Range< T >::Range ( )
constexprdefault

Default constructor

◆ Range() [2/2]

template<typename T >
constexpr Zivid::Range< T >::Range ( min,
max 
)
inlineconstexpr

Constructor

Member Function Documentation

◆ isInRange()

template<typename T >
constexpr bool Zivid::Range< T >::isInRange ( const T &  value) const
inlineconstexpr

Check if the value is in range

The range is inclusive, in other words both the minimum and maximum values are included in the range.

◆ max()

template<typename T >
constexpr const T & Zivid::Range< T >::max ( ) const
inlineconstexpr

Get the maximum value of the range

◆ min()

template<typename T >
constexpr const T & Zivid::Range< T >::min ( ) const
inlineconstexpr

Get the minimum value of the range

◆ operator!=()

template<typename T >
bool Zivid::Range< T >::operator!= ( const Range< T > &  other) const
inline

Comparison operator

◆ operator==()

template<typename T >
bool Zivid::Range< T >::operator== ( const Range< T > &  other) const
inline

Comparison operator

◆ toString()

template<typename T >
std::string Zivid::Range< T >::toString ( ) const
inline

Get the range as string


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