Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Range< TYPE > Class Template Reference

Range class. More...

#include <Range.h>

Classes

class  Iterator
 Iterators. More...
 
class  ReverseIterator
 Reverse Iterator. More...
 

Public Member Functions

 Range (TYPE count)
 
 Range (TYPE begin, TYPE end)
 
Iterator begin ()
 
Iterator end ()
 
ReverseIterator rbegin ()
 
ReverseIterator rend ()
 
bool exist (const TYPE &num) const
 

Private Attributes

TYPE beginNumber = 0
 
TYPE endNumber = 0
 

Detailed Description

template<class TYPE>
class sese::Range< TYPE >

Range class.

Template Parameters
TYPEValue type

Constructor & Destructor Documentation

◆ Range() [1/2]

template<class TYPE >
sese::Range< TYPE >::Range ( TYPE count)
inlineexplicit

This constructor is only for positive and incrementing ranges

Parameters
countThe size of the range
Note
[1, count]

References sese::Range< TYPE >::beginNumber, count(), and sese::Range< TYPE >::endNumber.

◆ Range() [2/2]

template<class TYPE >
sese::Range< TYPE >::Range ( TYPE begin,
TYPE end )
inline

This constructor is for any range, regardless of whether it is incrementing or decrementing

Parameters
beginStart
endEnd
Note
[begin, end]

References sese::Range< TYPE >::begin(), sese::Range< TYPE >::beginNumber, sese::Range< TYPE >::end(), and sese::Range< TYPE >::endNumber.

Member Function Documentation

◆ begin()

template<class TYPE >
Iterator sese::Range< TYPE >::begin ( )
inline

◆ end()

template<class TYPE >
Iterator sese::Range< TYPE >::end ( )
inline

◆ exist()

template<class TYPE >
bool sese::Range< TYPE >::exist ( const TYPE & num) const
inline

Check if a value is within the range

Parameters
numThe value to check
Returns
The result

References sese::Range< TYPE >::beginNumber, and sese::Range< TYPE >::endNumber.

◆ rbegin()

template<class TYPE >
ReverseIterator sese::Range< TYPE >::rbegin ( )
inline

◆ rend()

template<class TYPE >
ReverseIterator sese::Range< TYPE >::rend ( )
inline

Member Data Documentation

◆ beginNumber

◆ endNumber


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