VCTR
Loading...
Searching...
No Matches
vctr::Range< ValueType > Class Template Reference

A simple range class. More...

Public Types

using value_type = ValueType
 

Public Member Functions

constexpr Range (ValueType startValue, ValueType endValue) noexcept
 Constructs a range with given start and end values.
 
constexpr Range ()=default
 Constructs an empty range.
 
constexpr Range (const Range &)=default
 Copy constructor.
 
constexpr Range (Range &&)=default
 Move constructor.
 
constexpr void setStart (ValueType newStart) noexcept
 Sets a new start value.
 
constexpr void setEnd (ValueType newEnd) noexcept
 Sets a new end value.
 
constexpr ValueType getStart () const noexcept
 Returns the start of the range.
 
constexpr ValueType getLength () const noexcept
 Returns the length of the range.
 
constexpr ValueType getEnd () const noexcept
 Returns the end of the range.
 

Detailed Description

template<is::realNumber ValueType>
class vctr::Range< ValueType >

A simple range class.

The interface is intended to be compatible with the juce::Range class.

Constructor & Destructor Documentation

◆ Range() [1/4]

template<is::realNumber ValueType>
constexpr vctr::Range< ValueType >::Range ( ValueType  startValue,
ValueType  endValue 
)
inlineconstexprnoexcept

Constructs a range with given start and end values.

The end value must not be smaller than the start value.

◆ Range() [2/4]

template<is::realNumber ValueType>
constexpr vctr::Range< ValueType >::Range ( )
constexprdefault

Constructs an empty range.

◆ Range() [3/4]

template<is::realNumber ValueType>
constexpr vctr::Range< ValueType >::Range ( const Range< ValueType > &  )
constexprdefault

Copy constructor.

◆ Range() [4/4]

template<is::realNumber ValueType>
constexpr vctr::Range< ValueType >::Range ( Range< ValueType > &&  )
constexprdefault

Move constructor.

Member Function Documentation

◆ getEnd()

template<is::realNumber ValueType>
constexpr ValueType vctr::Range< ValueType >::getEnd ( ) const
inlineconstexprnoexcept

Returns the end of the range.

◆ getLength()

template<is::realNumber ValueType>
constexpr ValueType vctr::Range< ValueType >::getLength ( ) const
inlineconstexprnoexcept

Returns the length of the range.

◆ getStart()

template<is::realNumber ValueType>
constexpr ValueType vctr::Range< ValueType >::getStart ( ) const
inlineconstexprnoexcept

Returns the start of the range.

◆ setEnd()

template<is::realNumber ValueType>
constexpr void vctr::Range< ValueType >::setEnd ( ValueType  newEnd)
inlineconstexprnoexcept

Sets a new end value.

◆ setStart()

template<is::realNumber ValueType>
constexpr void vctr::Range< ValueType >::setStart ( ValueType  newStart)
inlineconstexprnoexcept

Sets a new start value.


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