IndexForEachIterator< I > Class Template Reference

#include <foreach.h>

Inheritance diagram for IndexForEachIterator< I >:

Public Types

using ValueType = decltype(*std::declval< I >())
 
using Iterator = I
 
- Public Types inherited from ForEachIterator< IndexForEachIterator< I > >
using IsForEachIterator = std::true_type
 

Public Member Functions

 IndexForEachIterator (I &&it)
 
 IndexForEachIterator (const I &it)
 
 IndexForEachIterator (IndexForEachIterator &&src)
 
 IndexForEachIterator (const IndexForEachIterator &src)=default
 
MAXON_ATTRIBUTE_FORCE_INLINE operator Bool () const
 
MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ()
 
MAXON_ATTRIBUTE_FORCE_INLINE void operator-- ()
 
MAXON_ATTRIBUTE_FORCE_INLINE IndexForEachIteratoroperator+= (Int n)
 
MAXON_ATTRIBUTE_FORCE_INLINE IndexForEachIteratoroperator-= (Int n)
 
MAXON_ATTRIBUTE_FORCE_INLINE ValueType operator* () const
 
MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference< ValueType >::typeoperator-> () const
 
Int GetIndex () const
 
- Public Member Functions inherited from ForEachIterator< IndexForEachIterator< I > >
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement=nullptr)
 
IndexForEachIterator< I > & Find (const T &v)
 
Int FindIndex (const T &v)
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool Contains (const T &v)
 
MAXON_ATTRIBUTE_FORCE_INLINE Wrapper begin ()
 

Private Attributes

_iterator
 
Int _index
 

Additional Inherited Members

- Static Public Member Functions inherited from ForEachIterator< IndexForEachIterator< I > >
static MAXON_ATTRIBUTE_FORCE_INLINE PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end()
 

Member Typedef Documentation

◆ ValueType

using ValueType = decltype(*std::declval<I>())

◆ Iterator

using Iterator = I

Constructor & Destructor Documentation

◆ IndexForEachIterator() [1/4]

IndexForEachIterator ( I &&  it)
explicit

◆ IndexForEachIterator() [2/4]

IndexForEachIterator ( const I &  it)
explicit

◆ IndexForEachIterator() [3/4]

◆ IndexForEachIterator() [4/4]

IndexForEachIterator ( const IndexForEachIterator< I > &  src)
default

Member Function Documentation

◆ operator Bool()

MAXON_ATTRIBUTE_FORCE_INLINE operator Bool ( ) const
explicit

◆ operator++()

MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ( )

◆ operator--()

MAXON_ATTRIBUTE_FORCE_INLINE void operator-- ( )

◆ operator+=()

◆ operator-=()

◆ operator*()

◆ operator->()

MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference<ValueType>::type* operator-> ( ) const

◆ GetIndex()

Int GetIndex ( ) const

Member Data Documentation

◆ _iterator

I _iterator
private

◆ _index

Int _index
private