MLIB
Loading...
Searching...
No Matches
mlib::ring_buffer< T >::const_iterator Class Reference

Iterator through the circular buffer. More...

#include <ringbuf.h>

Inheritance diagram for mlib::ring_buffer< T >::const_iterator:
mlib::ring_buffer< T >::iterator

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = T
 
using reference = T const&
 
using pointer = T const*
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

 const_iterator ()
 Default constructor.
 
reference operator* ()
 Dereference operator.
 
const reference operator* () const
 Dereference operator (const version)
 
pointer operator-> ()
 Object pointer.
 
const pointer operator-> () const
 Object pointer (const version)
 
const_iterator operator++ (int)
 Increment operator (postfix)
 
const_iteratoroperator++ ()
 Increment operator (prefix)
 
const_iterator operator-- (int)
 Decrement operator (postfix)
 
const_iteratoroperator-- ()
 Decrement operator (prefix)
 
bool operator== (const const_iterator &it) const
 Equality comparison.
 
bool operator!= (const const_iterator &it) const
 Inequality comparison.
 
const_iteratoroperator= (const const_iterator &rhs)
 Assignment operator.
 
const_iterator operator+ (size_t inc) const
 Addition operator.
 
const_iteratoroperator+= (size_t inc)
 Addition assignment operator.
 
const_iterator operator- (size_t dec) const
 Subtraction operator.
 
const_iteratoroperator-= (size_t dec)
 Subtraction assignment operator.
 
ptrdiff_t operator- (const const_iterator &other) const
 Difference operator.
 

Protected Member Functions

 const_iterator (const ring_buffer *ring_, size_t pos_)
 

Protected Attributes

const ring_bufferring
 
size_t pos
 

Friends

class ring_buffer
 

Detailed Description

template<class T>
class mlib::ring_buffer< T >::const_iterator

Iterator through the circular buffer.


The documentation for this class was generated from the following file: