OGS
BaseLib::Range< Iterator > Class Template Reference

Detailed Description

template<typename Iterator>
class BaseLib::Range< Iterator >

Wraps a pair of iterators for use as a range in range-based for-loops.

Definition at line 23 of file ConfigTree-impl.h.

#include <ConfigTree-impl.h>

Public Member Functions

 Range (Iterator begin, Iterator end)
Iterator begin () const
Iterator end () const
std::size_t size () const
bool empty () const

Private Attributes

Iterator begin_
Iterator end_

Constructor & Destructor Documentation

◆ Range()

template<typename Iterator>
BaseLib::Range< Iterator >::Range ( Iterator begin,
Iterator end )
inlineexplicit

Definition at line 26 of file ConfigTree-impl.h.

28 {
29 }
Wraps a pair of iterators for use as a range in range-based for-loops.
Iterator end() const
Iterator begin() const

References begin(), begin_, end(), and end_.

Member Function Documentation

◆ begin()

template<typename Iterator>
Iterator BaseLib::Range< Iterator >::begin ( ) const
inline

Definition at line 31 of file ConfigTree-impl.h.

31{ return begin_; }

References begin_.

Referenced by Range().

◆ empty()

template<typename Iterator>
bool BaseLib::Range< Iterator >::empty ( ) const
inline

Definition at line 34 of file ConfigTree-impl.h.

34{ return size() == 0; }
std::size_t size() const

References size().

◆ end()

template<typename Iterator>
Iterator BaseLib::Range< Iterator >::end ( ) const
inline

Definition at line 32 of file ConfigTree-impl.h.

32{ return end_; }

References end_.

Referenced by Range().

◆ size()

template<typename Iterator>
std::size_t BaseLib::Range< Iterator >::size ( ) const
inline

Definition at line 33 of file ConfigTree-impl.h.

33{ return std::distance(begin_, end_); }

References begin_, and end_.

Referenced by empty().

Member Data Documentation

◆ begin_

template<typename Iterator>
Iterator BaseLib::Range< Iterator >::begin_
private

Definition at line 37 of file ConfigTree-impl.h.

Referenced by Range(), begin(), and size().

◆ end_

template<typename Iterator>
Iterator BaseLib::Range< Iterator >::end_
private

Definition at line 38 of file ConfigTree-impl.h.

Referenced by Range(), end(), and size().


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