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

#include <ringbuffer.h>

详细描述

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  类型 = typename ConstIf < T , CONSTITERATOR >::type

公共成员函数

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

静态公共属性

static const Bool   isLinearIterator

Private Attributes

CollectionType _array
Int   _index

Member Typedef Documentation

◆  CollectionType

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

◆  类型

using 类型 = typename ConstIf < T , CONSTITERATOR>::type

构造函数 & 析构函数文档编制

◆  IteratorTemplate()

IteratorTemplate ( CollectionType a ,
Int   start = 0  
)
explicit

成员函数文档编制

◆  operator=()

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

◆  operator ConstIterator &()

operator ConstIterator & ( )

◆  operator Bool()

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

◆  GetPtr()

类型 * GetPtr ( ) const

◆  operator*()

类型 & operator* ( ) const

◆  operator->()

类型 * operator-> ( ) 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