www.mooseframework.org
Public Types | Public Member Functions | Private Attributes | List of all members
Moose::_enumerate_iterator< Iterator > Struct Template Reference

#include <Enumerate.h>

Public Types

using iterator = Iterator
 
using index_type = typename std::iterator_traits< iterator >::difference_type
 
using reference = typename std::iterator_traits< iterator >::reference
 

Public Member Functions

 _enumerate_iterator (index_type index, iterator iterator)
 
_enumerate_iteratoroperator++ ()
 
bool operator!= (const _enumerate_iterator &other) const
 
std::pair< index_type &, referenceoperator* ()
 
_enumerate_struct< iteratoroperator* ()
 

Private Attributes

index_type index
 
iterator iter
 

Detailed Description

template<class Iterator>
struct Moose::_enumerate_iterator< Iterator >

Definition at line 23 of file Enumerate.h.

Member Typedef Documentation

◆ index_type

template<class Iterator >
using Moose::_enumerate_iterator< Iterator >::index_type = typename std::iterator_traits<iterator>::difference_type

Definition at line 100 of file Enumerate.h.

◆ iterator

template<class Iterator >
using Moose::_enumerate_iterator< Iterator >::iterator = Iterator

Definition at line 99 of file Enumerate.h.

◆ reference

template<class Iterator >
using Moose::_enumerate_iterator< Iterator >::reference = typename std::iterator_traits<iterator>::reference

Definition at line 101 of file Enumerate.h.

Constructor & Destructor Documentation

◆ _enumerate_iterator()

template<class Iterator >
Moose::_enumerate_iterator< Iterator >::_enumerate_iterator ( index_type  index,
iterator  iterator 
)
inline

Definition at line 103 of file Enumerate.h.

Member Function Documentation

◆ operator!=()

template<class Iterator >
bool Moose::_enumerate_iterator< Iterator >::operator!= ( const _enumerate_iterator< Iterator > &  other) const
inline

Definition at line 112 of file Enumerate.h.

112 { return iter != other.iter; }

◆ operator*() [1/2]

template<class Iterator >
std::pair<index_type &, reference> Moose::_enumerate_iterator< Iterator >::operator* ( )
inline

Definition at line 115 of file Enumerate.h.

115 { return {index, *iter}; }

◆ operator*() [2/2]

template<class Iterator >
_enumerate_struct<iterator> Moose::_enumerate_iterator< Iterator >::operator* ( )
inline

Definition at line 117 of file Enumerate.h.

117 { return _enumerate_struct<iterator>(index, iter); }

◆ operator++()

template<class Iterator >
_enumerate_iterator& Moose::_enumerate_iterator< Iterator >::operator++ ( )
inline

Definition at line 105 of file Enumerate.h.

106  {
107  ++index;
108  ++iter;
109  return *this;
110  }

Member Data Documentation

◆ index

template<class Iterator >
index_type Moose::_enumerate_iterator< Iterator >::index
private

◆ iter

template<class Iterator >
iterator Moose::_enumerate_iterator< Iterator >::iter
private

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