cgv
Loading...
Searching...
No Matches
cgv::utils::indexed_iterator< iterator_type > Class Template Reference
Inheritance diagram for cgv::utils::indexed_iterator< iterator_type >:
cgv::utils::count_iterator< iterator_type > cgv::utils::enumerate_iterator< iterator_type >

Public Types

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

Public Member Functions

 indexed_iterator (iterator iter, index_type start)
 
indexed_iteratoroperator++ ()
 
bool operator== (const indexed_iterator &other) const
 
bool operator!= (const indexed_iterator &other) const
 
std::pair< reference, const index_type & > operator* () const
 

Protected Attributes

iterator iter
 
index_type index = 0
 

Detailed Description

template<typename iterator_type>
class cgv::utils::indexed_iterator< iterator_type >

Definition at line 15 of file enumerate.h.

Member Typedef Documentation

◆ index_type

template<typename iterator_type >
using cgv::utils::indexed_iterator< iterator_type >::index_type = typename std::iterator_traits<iterator>::difference_type

Definition at line 19 of file enumerate.h.

◆ iterator

template<typename iterator_type >
using cgv::utils::indexed_iterator< iterator_type >::iterator = iterator_type

Definition at line 17 of file enumerate.h.

◆ reference

template<typename iterator_type >
using cgv::utils::indexed_iterator< iterator_type >::reference = typename std::iterator_traits<iterator>::reference

Definition at line 18 of file enumerate.h.

Constructor & Destructor Documentation

◆ indexed_iterator()

template<typename iterator_type >
cgv::utils::indexed_iterator< iterator_type >::indexed_iterator ( iterator  iter,
index_type  start 
)
inlineexplicit

Definition at line 25 of file enumerate.h.

Member Function Documentation

◆ operator!=()

template<typename iterator_type >
bool cgv::utils::indexed_iterator< iterator_type >::operator!= ( const indexed_iterator< iterator_type > &  other) const
inline

Definition at line 35 of file enumerate.h.

◆ operator*()

template<typename iterator_type >
std::pair< reference, const index_type & > cgv::utils::indexed_iterator< iterator_type >::operator* ( ) const
inline

Definition at line 38 of file enumerate.h.

◆ operator++()

template<typename iterator_type >
indexed_iterator & cgv::utils::indexed_iterator< iterator_type >::operator++ ( )
inline

Definition at line 27 of file enumerate.h.

◆ operator==()

template<typename iterator_type >
bool cgv::utils::indexed_iterator< iterator_type >::operator== ( const indexed_iterator< iterator_type > &  other) const
inline

Definition at line 32 of file enumerate.h.

Member Data Documentation

◆ index

template<typename iterator_type >
index_type cgv::utils::indexed_iterator< iterator_type >::index = 0
protected

Definition at line 22 of file enumerate.h.

◆ iter

template<typename iterator_type >
iterator cgv::utils::indexed_iterator< iterator_type >::iter
protected

Definition at line 21 of file enumerate.h.


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