BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > Class Template Reference

#include <collection.h>

Inheritance diagram for BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED >:

Detailed Description

template<typename COLLECTION, typename VALUETYPE, Bool CONSTITERATOR, Bool STRIDED>
class maxon::BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED >

ForEachIterator-based class which iterates over the memory blocks of a collection. For a BaseArray you have just one Block, for the BlockArray as many as have been allocated and for a BaseList or PointerArray each element has its own Block.

Public Types

using CollectionType = typename ConstIf< COLLECTION, CONSTITERATOR >::type
 
using ElementType = typename ConstIf< VALUETYPE, CONSTITERATOR >::type
 
using ValueType = Block< ElementType, STRIDED >
 
- Public Types inherited from ForEachIterator< BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > >
using IsForEachIterator = std::true_type
 

Public Member Functions

 BlockIterator ()
 
 BlockIterator (const BlockIterator &)=default
 
BlockIteratoroperator= (const BlockIterator &)=default
 
MAXON_IMPLICIT BlockIterator (CollectionType *array)
 
ValueTypeoperator* ()
 
ValueTypeoperator-> ()
 
 operator Bool () const
 
BlockIteratoroperator++ ()
 
void operator++ (int)
 
- Public Member Functions inherited from ForEachIterator< BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > >
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement=nullptr)
 
BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > & 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

ValueType _block
 
CollectionType_array
 
Int _index
 

Additional Inherited Members

- Static Public Member Functions inherited from ForEachIterator< BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > >
static MAXON_ATTRIBUTE_FORCE_INLINE PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end()
 

Member Typedef Documentation

◆ CollectionType

using CollectionType = typename ConstIf<COLLECTION, CONSTITERATOR>::type

◆ ElementType

using ElementType = typename ConstIf<VALUETYPE, CONSTITERATOR>::type

◆ ValueType

using ValueType = Block<ElementType, STRIDED>

Constructor & Destructor Documentation

◆ BlockIterator() [1/3]

◆ BlockIterator() [2/3]

BlockIterator ( const BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > &  )
default

◆ BlockIterator() [3/3]

Member Function Documentation

◆ operator=()

BlockIterator& operator= ( const BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED > &  )
default

◆ operator*()

ValueType& operator* ( )

◆ operator->()

ValueType* operator-> ( )

◆ operator Bool()

operator Bool ( ) const
explicit

◆ operator++() [1/2]

BlockIterator& operator++ ( )

◆ operator++() [2/2]

void operator++ ( int  )

Member Data Documentation

◆ _block

ValueType _block
private

◆ _array

CollectionType* _array
private

◆ _index

Int _index
private