SingletonForEachIterator< T > Class Template Reference

#include <foreach.h>

Inheritance diagram for SingletonForEachIterator< T >:

Detailed Description

template<typename T>
class maxon::SingletonForEachIterator< T >

SingletonForEachIterator implements the foreach-protocol such that it iterates a single time over a single value.

Template Parameters
TThe type of the object to iterate over.
See also
Iterable

Public Types

using ValueType = typename ConstIf< typename std::remove_reference< T >::type, !STD_IS_REPLACEMENT(reference, T)>::type
 
- Public Types inherited from ForEachIterator< SingletonForEachIterator< T > >
using IsForEachIterator = std::true_type
 

Public Member Functions

MAXON_ATTRIBUTE_FORCE_INLINE SingletonForEachIterator (T &&value)
 
MAXON_ATTRIBUTE_FORCE_INLINE SingletonForEachIterator (SingletonForEachIterator &&src)
 
 SingletonForEachIterator (const SingletonForEachIterator &src)=default
 
MAXON_ATTRIBUTE_FORCE_INLINE operator Bool () const
 
MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ()
 
MAXON_ATTRIBUTE_FORCE_INLINE ValueTypeoperator* () const
 
MAXON_ATTRIBUTE_FORCE_INLINE ValueTypeoperator-> () const
 
- Public Member Functions inherited from ForEachIterator< SingletonForEachIterator< T > >
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement)
 
SingletonForEachIterator< T > & 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

_value
 
Bool _valid
 

Additional Inherited Members

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

Member Typedef Documentation

◆ ValueType

using ValueType = typename ConstIf<typename std::remove_reference<T>::type, !STD_IS_REPLACEMENT(reference, T)>::type

Constructor & Destructor Documentation

◆ SingletonForEachIterator() [1/3]

◆ SingletonForEachIterator() [2/3]

◆ SingletonForEachIterator() [3/3]

SingletonForEachIterator ( const SingletonForEachIterator< T > &  src)
default

Member Function Documentation

◆ operator Bool()

MAXON_ATTRIBUTE_FORCE_INLINE operator Bool ( ) const
explicit

◆ operator++()

MAXON_ATTRIBUTE_FORCE_INLINE void operator++ ( )

◆ operator*()

◆ operator->()

MAXON_ATTRIBUTE_FORCE_INLINE ValueType* operator-> ( ) const

Member Data Documentation

◆ _value

T _value
private

◆ _valid

Bool _valid
private