RingBuffer< ARRAYTYPE, RINGSIZE >::IteratorTemplate< CONSTITERATOR > Class Template Reference

#include <ringbuffer.h>

Detailed Description

template<typename ARRAYTYPE, Int RINGSIZE>
template<Bool CONSTITERATOR>
class maxon::RingBuffer< ARRAYTYPE, RINGSIZE >::IteratorTemplate< CONSTITERATOR >

The RingBuffer iterator iterates the underlying BaseArray in correct order starting from _ringPos (for Begin) and might wrap if necessary.

Public Types

using CollectionType = typename ConstIf< RingBuffer, CONSTITERATOR >::type
 
using Type = typename ConstIf< T, CONSTITERATOR >::type
 

Public Member Functions

 IteratorTemplate (CollectionType &a, Int start=0)
 
IteratorTemplateoperator= (const IteratorTemplate &src)
 
 operator ConstIterator & ()
 
 operator Bool () const
 
TypeGetPtr () const
 
Typeoperator* () const
 
Typeoperator-> () const
 
Bool operator== (const IteratorTemplate &b) const
 
Bool operator< (const IteratorTemplate &b) const
 
 MAXON_OPERATOR_COMPARISON (IteratorTemplate)
 
IteratorTemplateoperator++ ()
 
const IteratorTemplate operator++ (int)
 
IteratorTemplateoperator+= (Int i)
 
IteratorTemplate operator+ (Int i) const
 
IteratorTemplateoperator-- ()
 
const IteratorTemplate operator-- (int)
 
IteratorTemplateoperator-= (Int i)
 
IteratorTemplate operator- (Int i) const
 
Int operator- (const IteratorTemplate &b) const
 

Static Public Attributes

static const Bool isLinearIterator
 

Private Attributes

CollectionType_array
 
Int _index
 

Member Typedef Documentation

◆ CollectionType

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

◆ Type

using Type = typename ConstIf<T, CONSTITERATOR>::type

Constructor & Destructor Documentation

◆ IteratorTemplate()

IteratorTemplate ( CollectionType a,
Int  start = 0 
)
explicit

Member Function Documentation

◆ operator=()

IteratorTemplate& operator= ( const IteratorTemplate< CONSTITERATOR > &  src)

◆ operator ConstIterator &()

operator ConstIterator & ( )

◆ operator Bool()

operator Bool ( ) const
explicit
Returns
true if the iterator points to an element.

◆ GetPtr()

Type* GetPtr ( void  ) const

◆ operator*()

Type& operator* ( ) const

◆ operator->()

Type* operator-> ( void  ) const

◆ operator==()

Bool operator== ( const IteratorTemplate< CONSTITERATOR > &  b) const

◆ operator<()

Bool operator< ( const IteratorTemplate< CONSTITERATOR > &  b) const

◆ MAXON_OPERATOR_COMPARISON()

MAXON_OPERATOR_COMPARISON ( IteratorTemplate< CONSTITERATOR >  )

◆ operator++() [1/2]

IteratorTemplate& operator++ ( )

◆ operator++() [2/2]

const IteratorTemplate operator++ ( int  )

◆ operator+=()

IteratorTemplate& operator+= ( Int  i)

◆ operator+()

IteratorTemplate operator+ ( Int  i) const

◆ operator--() [1/2]

IteratorTemplate& operator-- ( )

◆ operator--() [2/2]

const IteratorTemplate operator-- ( int  )

◆ operator-=()

IteratorTemplate& operator-= ( Int  i)

◆ operator-() [1/2]

IteratorTemplate operator- ( Int  i) const

◆ operator-() [2/2]

Int operator- ( const IteratorTemplate< CONSTITERATOR > &  b) const

Member Data Documentation

◆ isLinearIterator

const Bool isLinearIterator
static

◆ _array

CollectionType* _array
private

◆ _index

Int _index
private