PIDUINO
Loading...
Searching...
No Matches
Piduino::RingBuffer< T, A >::iterator_< E, EN >

RingBuffer iterator class template. More...

#include <ringbuffer.h>

Inheritance diagram for Piduino::RingBuffer< T, A >::iterator_< E, EN >:
Collaboration diagram for Piduino::RingBuffer< T, A >::iterator_< E, EN >:

Public Types

typedef E elem_type
 
typedef EN elem_type_nc
 
typedef iterator_< elem_type, elem_type_ncself_type
 
typedef RingBuffer< T, A > RingBufferType
 

Public Member Functions

 iterator_ (RingBufferType *const buf, size_type const pos)
 
 iterator_ (RingBufferType const *const buf, size_type const pos)
 
 iterator_ (iterator_< elem_type_nc, elem_type_nc > const &other)
 
self_typeoperator= (self_type const &other)
 
elem_typeoperator* ()
 
elem_typeoperator-> ()
 
self_typeoperator++ ()
 
self_type operator++ (int)
 
self_typeoperator-- ()
 
self_type operator-- (int)
 
self_type operator+ (difference_type const n) const
 
self_typeoperator+= (difference_type const n)
 
self_type operator- (difference_type const n) const
 
self_typeoperator-= (difference_type const n)
 
difference_type operator- (self_type const &c) const
 
bool operator== (self_type const &other) const
 
bool operator!= (self_type const &other) const
 
bool operator> (self_type const &other) const
 
bool operator>= (self_type const &other) const
 
bool operator< (self_type const &other) const
 
bool operator<= (self_type const &other) const
 

Private Attributes

RingBufferTypem_buf
 
size_type m_pos
 

Detailed Description

template<typename T, typename A = std::allocator<T>>
template<typename E, typename EN>
class Piduino::RingBuffer< T, A >::iterator_< E, EN >

RingBuffer iterator class template.

Definition at line 192 of file ringbuffer.h.

Member Typedef Documentation

◆ elem_type

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
typedef E Piduino::RingBuffer< T, A >::iterator_< E, EN >::elem_type

Definition at line 195 of file ringbuffer.h.

◆ elem_type_nc

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
typedef EN Piduino::RingBuffer< T, A >::iterator_< E, EN >::elem_type_nc

Definition at line 198 of file ringbuffer.h.

◆ RingBufferType

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
typedef RingBuffer<T, A> Piduino::RingBuffer< T, A >::iterator_< E, EN >::RingBufferType

Definition at line 203 of file ringbuffer.h.

◆ self_type

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
typedef iterator_<elem_type, elem_type_nc> Piduino::RingBuffer< T, A >::iterator_< E, EN >::self_type

Definition at line 200 of file ringbuffer.h.

Constructor & Destructor Documentation

◆ iterator_() [1/3]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
Piduino::RingBuffer< T, A >::iterator_< E, EN >::iterator_ ( RingBufferType *const  buf,
size_type const  pos 
)
inline

Definition at line 209 of file ringbuffer.h.

◆ iterator_() [2/3]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
Piduino::RingBuffer< T, A >::iterator_< E, EN >::iterator_ ( RingBufferType const *const  buf,
size_type const  pos 
)
inline

Definition at line 214 of file ringbuffer.h.

◆ iterator_() [3/3]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
Piduino::RingBuffer< T, A >::iterator_< E, EN >::iterator_ ( iterator_< elem_type_nc, elem_type_nc > const &  other)
inline

Definition at line 225 of file ringbuffer.h.

Member Function Documentation

◆ operator!=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator!= ( self_type const &  other) const
inline

◆ operator*()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
elem_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator* ( )
inline

◆ operator+()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator+ ( difference_type const  n) const
inline

◆ operator++() [1/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator++ ( int  )
inline

Definition at line 257 of file ringbuffer.h.

◆ operator+=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator+= ( difference_type const  n)
inline

◆ operator-() [1/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator- ( difference_type const  n) const
inline

◆ operator-() [2/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
difference_type Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator- ( self_type const &  c) const
inline

◆ operator--() [1/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator-- ( int  )
inline

Definition at line 268 of file ringbuffer.h.

◆ operator-=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator-= ( difference_type const  n)
inline

◆ operator->()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
elem_type * Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator-> ( )
inline

Definition at line 244 of file ringbuffer.h.

References Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator*().

Here is the call graph for this function:

◆ operator<()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator< ( self_type const &  other) const
inline

◆ operator<=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator<= ( self_type const &  other) const
inline

◆ operator=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
self_type & Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator= ( self_type const &  other)
inline

◆ operator==()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator== ( self_type const &  other) const
inline

◆ operator>()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator> ( self_type const &  other) const
inline

◆ operator>=()

template<typename T , typename A = std::allocator<T>>
template<typename E , typename EN >
bool Piduino::RingBuffer< T, A >::iterator_< E, EN >::operator>= ( self_type const &  other) const
inline

Member Data Documentation

◆ m_buf

◆ m_pos