InspIRCd  4.0
Public Member Functions | List of all members
insp::iterator_range< Iterator > Class Template Reference

#include <iterator_range.h>

Public Member Functions

 iterator_range (Iterator begin, Iterator end)
 
 iterator_range (std::pair< Iterator, Iterator > range)
 
bool empty () const
 
const Iterator & begin () const
 
const Iterator & end () const
 
Iterator::difference_type count () const
 

Detailed Description

template<typename Iterator>
class insp::iterator_range< Iterator >

Represents a range of iterators.

Constructor & Destructor Documentation

◆ iterator_range() [1/2]

template<typename Iterator >
insp::iterator_range< Iterator >::iterator_range ( Iterator  begin,
Iterator  end 
)
inlineexplicit

Initialises a new iterator range with the specified iterators.

Parameters
beginAn iterator which points to the start of the range.
endAn iterator which points to one past the end of the range.

◆ iterator_range() [2/2]

template<typename Iterator >
insp::iterator_range< Iterator >::iterator_range ( std::pair< Iterator, Iterator >  range)
inlineexplicit

Initialises a new iterator range from a pair of iterators.

Parameters
rangeA pair of iterators in the format [first, last).

Member Function Documentation

◆ begin()

template<typename Iterator >
const Iterator& insp::iterator_range< Iterator >::begin ( ) const
inline

Retrieves an iterator which points to the start of the range.

◆ count()

template<typename Iterator >
Iterator::difference_type insp::iterator_range< Iterator >::count ( ) const
inline

Retrieves the number of hops within the iterator range.

◆ empty()

template<typename Iterator >
bool insp::iterator_range< Iterator >::empty ( ) const
inline

Determines whether the iterator range is empty.

◆ end()

template<typename Iterator >
const Iterator& insp::iterator_range< Iterator >::end ( ) const
inline

Retrieves an iterator which points to one past the end of the range.


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