CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Math::TRange< OffsetT, LengthT > Struct Template Referencefinal

#include <CeresEngine/Math/Range.hpp>

Public Member Functions

constexpr TRange () noexcept=default
 
constexpr TRange (OffsetT offset, LengthT length) noexcept
 
constexpr TRange (const TRange &) noexcept=default
 
constexpr TRangeoperator= (const TRange &) noexcept=default
 
constexpr bool operator[] (OffsetT off) const noexcept
 Check if the range includes the offset off.
 
constexpr operator bool () const noexcept
 Checks if the length is != 0.
 
constexpr bool empty () const noexcept
 Checks if the length is == 0.
 
constexpr void clear () noexcept
 Clears the range.
 
constexpr OffsetT begin () const noexcept
 
constexpr OffsetT end () const noexcept
 

Public Attributes

OffsetT offset = 0
 The range starting offset.
 
LengthT length = 0
 The range length.
 

Constructor & Destructor Documentation

◆ TRange() [1/3]

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr Math::TRange< OffsetT, LengthT >::TRange ( )
constexprdefaultnoexcept

◆ TRange() [2/3]

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr Math::TRange< OffsetT, LengthT >::TRange ( OffsetT  offset,
LengthT  length 
)
inlineconstexprnoexcept

◆ TRange() [3/3]

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr Math::TRange< OffsetT, LengthT >::TRange ( const TRange< OffsetT, LengthT > &  )
constexprdefaultnoexcept

Member Function Documentation

◆ begin()

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr OffsetT Math::TRange< OffsetT, LengthT >::begin ( ) const
inlineconstexprnoexcept

◆ clear()

template<typename OffsetT , typename LengthT >
constexpr void Math::TRange< OffsetT, LengthT >::clear ( )
constexprnoexcept

Clears the range.

◆ empty()

template<typename OffsetT , typename LengthT >
constexpr bool Math::TRange< OffsetT, LengthT >::empty ( ) const
constexprnoexcept

Checks if the length is == 0.

◆ end()

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr OffsetT Math::TRange< OffsetT, LengthT >::end ( ) const
inlineconstexprnoexcept

◆ operator bool()

template<typename OffsetT , typename LengthT >
constexpr Math::TRange< OffsetT, LengthT >::operator bool ( ) const
explicitconstexprnoexcept

Checks if the length is != 0.

◆ operator=()

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
constexpr TRange & Math::TRange< OffsetT, LengthT >::operator= ( const TRange< OffsetT, LengthT > &  )
constexprdefaultnoexcept

◆ operator[]()

template<typename OffsetT , typename LengthT >
constexpr bool Math::TRange< OffsetT, LengthT >::operator[] ( OffsetT  off) const
constexprnoexcept

Check if the range includes the offset off.

Member Data Documentation

◆ length

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
LengthT Math::TRange< OffsetT, LengthT >::length = 0

The range length.

◆ offset

template<typename OffsetT = UInt64, typename LengthT = OffsetT>
OffsetT Math::TRange< OffsetT, LengthT >::offset = 0

The range starting offset.


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