template<typename ITERATOR, typename SUPER = EmptyClass>
class maxon::ForEachIterator< ITERATOR, SUPER >
ForEachIterator is a helper template for the implementation of a foreach iterator (see maxon::Iterable). You can use it as public base class for your foreach iterator class with the template argument ITERATOR being your class as in
{
public:
explicit operator Bool()
const;
};
Definition: c4d_string.h:39
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator(ARGS &&... args)
Definition: foreach.h:248
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:181
Col3< typename MultiplicativePromotion< T, S, STD_IS_REPLACEMENT(scalar, S)>::type, 1 > operator*(S s, const Col3< T, STR > &v)
Multiplies each vector component by a scalar.
Definition: col.h:463
PORT_DIR & operator++(PORT_DIR &dir)
Definition: graph_basics.h:44
This relieves you from the need to declare a IsForEachIterator type alias, and it adds some functions such as ToString and Contains. However note that these functions are non-const, i.e., they use the current iterator for the iteration so that it will point to another iteration value after function completion.
- See also
- maxon::Iterable
-
$ref foreach
- Template Parameters
-
ITERATOR | The class which implements the foreach protocol, ForEachIterator should be its base class. |
SUPER | This is used as base class of ForEachIterator. |