ConditionalForEachIterator< T, I1, I2 > Class Template Reference

#include <foreach.h>

Inheritance diagram for ConditionalForEachIterator< T, I1, I2 >:

Detailed Description

template<typename T, typename I1, typename I2>
class maxon::ConditionalForEachIterator< T, I1, I2 >

ConditionalForEachIterator implements the foreach-protocol such that it iterates either completely over a first foreach iterator or completely over a second foreach iterator, depending on a Bool value.

Template Parameters
TThe type of values to iterate over.
I1The type of the first iterator.
I2The type of the second iterator.
See also
Iterable

Public Types

using First = I1
 
using Second = I2
 
using Types = CommonIteratorTypes< T, I1, I2 >
 
using ValueType = typename Types::ValueType
 
- Public Types inherited from ForEachIterator< ConditionalForEachIterator< T, I1, I2 > >
using IsForEachIterator = std::true_type
 

Public Member Functions

 ConditionalForEachIterator (Bool sel, I1 &&it1, I2 &&it2)
 
 ConditionalForEachIterator (Bool sel, const I1 &it1, I2 &&it2)
 
 ConditionalForEachIterator (Bool sel, I1 &&it1, const I2 &it2)
 
 ConditionalForEachIterator (Bool sel, const I1 &it1, const I2 &it2)
 
MAXON_ATTRIBUTE_FORCE_INLINE ConditionalForEachIterator (ConditionalForEachIterator &&src)
 
 ConditionalForEachIterator (const ConditionalForEachIterator &src)=default
 
MAXON_ATTRIBUTE_FORCE_INLINE operator Bool () const
 
MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ()
 
MAXON_ATTRIBUTE_FORCE_INLINE ValueType operator* () const
 
MAXON_ATTRIBUTE_FORCE_INLINE Types::ValueTypeNoRefoperator-> () const
 
I1 & GetFirst ()
 
I2 & GetSecond ()
 
- Public Member Functions inherited from ForEachIterator< ConditionalForEachIterator< T, I1, I2 > >
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement)
 
ConditionalForEachIterator< T, I1, I2 > & 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

const Bool _select
 
I1 _first
 
I2 _second
 

Additional Inherited Members

- Static Public Member Functions inherited from ForEachIterator< ConditionalForEachIterator< T, I1, I2 > >
static MAXON_ATTRIBUTE_FORCE_INLINE PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end()
 

Member Typedef Documentation

◆ First

using First = I1

◆ Second

using Second = I2

◆ Types

using Types = CommonIteratorTypes<T, I1, I2>

◆ ValueType

using ValueType = typename Types::ValueType

Constructor & Destructor Documentation

◆ ConditionalForEachIterator() [1/6]

ConditionalForEachIterator ( Bool  sel,
I1 &&  it1,
I2 &&  it2 
)

◆ ConditionalForEachIterator() [2/6]

ConditionalForEachIterator ( Bool  sel,
const I1 &  it1,
I2 &&  it2 
)

◆ ConditionalForEachIterator() [3/6]

ConditionalForEachIterator ( Bool  sel,
I1 &&  it1,
const I2 &  it2 
)

◆ ConditionalForEachIterator() [4/6]

ConditionalForEachIterator ( Bool  sel,
const I1 &  it1,
const I2 &  it2 
)

◆ ConditionalForEachIterator() [5/6]

◆ ConditionalForEachIterator() [6/6]

ConditionalForEachIterator ( const ConditionalForEachIterator< T, I1, I2 > &  src)
default

Member Function Documentation

◆ operator Bool()

MAXON_ATTRIBUTE_FORCE_INLINE operator Bool ( ) const
explicit

◆ operator++()

MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ( )

◆ operator*()

◆ operator->()

◆ GetFirst()

I1& GetFirst ( )

◆ GetSecond()

I2& GetSecond ( )

Member Data Documentation

◆ _select

const Bool _select
private

◆ _first

I1 _first
private

◆ _second

I2 _second
private