Volume Cartographer 2.27.0
Public Member Functions | Private Attributes | List of all members
volcart::EnumerateIterable< Iterable >::EnumerateIterator< T > Class Template Reference

Public Types

using difference_type = std::size_t
 
using value_type = std::pair< std::size_t, decltype(*std::declval< T & >())& >
 
using pointer = value_type *
 
using reference = value_type
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 EnumerateIterator (std::size_t idx, T &&it)
 
value_type operator* () const
 
bool operator== (const EnumerateIterator &other) const
 
bool operator!= (const EnumerateIterator &other) const
 
EnumerateIteratoroperator++ ()
 

Private Attributes

std::size_t idx_
 
it_
 

Detailed Description

template<class Iterable>
template<class T>
class volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >

enumerate iterator class. Tracks the iterator and index of the item

Definition at line 406 of file Iteration.hpp.

Member Typedef Documentation

◆ difference_type

template<class Iterable >
template<class T >
using volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::difference_type = std::size_t

Iterator type traits

Definition at line 414 of file Iteration.hpp.

◆ iterator_category

template<class Iterable >
template<class T >
using volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::iterator_category = std::input_iterator_tag

Definition at line 419 of file Iteration.hpp.

◆ pointer

template<class Iterable >
template<class T >
using volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::pointer = value_type*

Definition at line 417 of file Iteration.hpp.

◆ reference

template<class Iterable >
template<class T >
using volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::reference = value_type

Definition at line 418 of file Iteration.hpp.

◆ value_type

template<class Iterable >
template<class T >
using volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::value_type = std::pair<std::size_t, decltype(*std::declval<T&>())&>

Definition at line 415 of file Iteration.hpp.

Constructor & Destructor Documentation

◆ EnumerateIterator()

template<class Iterable >
template<class T >
volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::EnumerateIterator ( std::size_t  idx,
T &&  it 
)
inlineexplicit

Constructor for the iterator

Definition at line 423 of file Iteration.hpp.

Member Function Documentation

◆ operator!=()

template<class Iterable >
template<class T >
bool volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::operator!= ( const EnumerateIterator< T > &  other) const
inline

Inequality comparison

Definition at line 438 of file Iteration.hpp.

◆ operator*()

template<class Iterable >
template<class T >
value_type volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::operator* ( ) const
inline

Get the underlying referenced object

Definition at line 429 of file Iteration.hpp.

◆ operator++()

template<class Iterable >
template<class T >
EnumerateIterator & volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::operator++ ( )
inline

Increment the index and the wrapped iterator

Definition at line 444 of file Iteration.hpp.

◆ operator==()

template<class Iterable >
template<class T >
bool volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::operator== ( const EnumerateIterator< T > &  other) const
inline

Equality comparison: defer to wrapped iterators

Definition at line 432 of file Iteration.hpp.

Member Data Documentation

◆ idx_

template<class Iterable >
template<class T >
std::size_t volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::idx_
private

Definition at line 409 of file Iteration.hpp.

◆ it_

template<class Iterable >
template<class T >
T volcart::EnumerateIterable< Iterable >::EnumerateIterator< T >::it_
private

Definition at line 410 of file Iteration.hpp.


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