TwiceAsNice  2019-02-18
Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | List of all members
boost::cb_details::iterator< Buff, Traits > Class Template Reference

Random access iterator for the circular buffer. More...

#include <details.hpp>

Inheritance diagram for boost::cb_details::iterator< Buff, Traits >:
Inheritance graph
Collaboration diagram for boost::cb_details::iterator< Buff, Traits >:
Collaboration graph

Public Types

typedef base_iterator::value_type value_type
 The type of the elements stored in the circular buffer. More...
 
typedef base_iterator::pointer pointer
 Pointer to the element. More...
 
typedef base_iterator::reference reference
 Reference to the element. More...
 
typedef Traits::size_type size_type
 Size type. More...
 
typedef base_iterator::difference_type difference_type
 Difference type. More...
 

Public Member Functions

 iterator ()
 Default constructor. More...
 
 iterator (const nonconst_self &it)
 
 iterator (const Buff *cb, const pointer p)
 
iteratoroperator= (const iterator &it)
 Assign operator. More...
 
reference operator* () const
 Dereferencing operator. More...
 
pointer operator-> () const
 Dereferencing operator. More...
 
difference_type operator- (const iterator &it) const
 Difference operator. More...
 
iteratoroperator++ ()
 Increment operator (prefix). More...
 
iterator operator++ (int)
 Increment operator (postfix). More...
 
iteratoroperator-- ()
 Decrement operator (prefix). More...
 
iterator operator-- (int)
 Decrement operator (postfix). More...
 
iteratoroperator+= (difference_type n)
 Iterator addition. More...
 
iterator operator+ (difference_type n) const
 Iterator addition. More...
 
iteratoroperator-= (difference_type n)
 Iterator subtraction. More...
 
iterator operator- (difference_type n) const
 Iterator subtraction. More...
 
reference operator[] (difference_type n) const
 Element access operator. More...
 
template<class Traits0 >
bool operator== (const iterator< Buff, Traits0 > &it) const
 Equality. More...
 
template<class Traits0 >
bool operator!= (const iterator< Buff, Traits0 > &it) const
 Inequality. More...
 
template<class Traits0 >
bool operator< (const iterator< Buff, Traits0 > &it) const
 Less. More...
 
template<class Traits0 >
bool operator> (const iterator< Buff, Traits0 > &it) const
 Greater. More...
 
template<class Traits0 >
bool operator<= (const iterator< Buff, Traits0 > &it) const
 Less or equal. More...
 
template<class Traits0 >
bool operator>= (const iterator< Buff, Traits0 > &it) const
 Greater or equal. More...
 

Public Attributes

const Buff * m_buff
 The circular buffer where the iterator points to. More...
 
pointer m_it
 An internal iterator. More...
 

Private Types

typedef boost::iterator< std::random_access_iterator_tag, typename Traits::value_type, typename Traits::difference_type, typename Traits::pointer, typename Traits::reference > base_iterator
 Base iterator. More...
 
typedef iterator< Buff, typename Traits::nonconst_self > nonconst_self
 Non-const iterator. More...
 

Private Member Functions

template<class Traits0 >
helper_pointer< Traits0 > create_helper_pointer (const iterator< Buff, Traits0 > &it) const
 Create helper pointer. More...
 
template<class InternalIterator0 , class InternalIterator1 >
bool less (const InternalIterator0 &lhs, const InternalIterator1 &rhs) const
 Less. More...
 

Detailed Description

template<class Buff, class Traits>
class boost::cb_details::iterator< Buff, Traits >

Random access iterator for the circular buffer.

Parameters
BuffThe type of the underlying circular buffer.
TraitsBasic iterator types.
Note
This iterator is not circular. It was designed for iterating from begin() to end() of the circular buffer.

Member Typedef Documentation

◆ base_iterator

template<class Buff , class Traits >
typedef boost::iterator< std::random_access_iterator_tag, typename Traits::value_type, typename Traits::difference_type, typename Traits::pointer, typename Traits::reference> boost::cb_details::iterator< Buff, Traits >::base_iterator
private

Base iterator.

◆ difference_type

template<class Buff , class Traits >
typedef base_iterator::difference_type boost::cb_details::iterator< Buff, Traits >::difference_type

Difference type.

◆ nonconst_self

template<class Buff , class Traits >
typedef iterator<Buff, typename Traits::nonconst_self> boost::cb_details::iterator< Buff, Traits >::nonconst_self
private

Non-const iterator.

◆ pointer

template<class Buff , class Traits >
typedef base_iterator::pointer boost::cb_details::iterator< Buff, Traits >::pointer

Pointer to the element.

◆ reference

template<class Buff , class Traits >
typedef base_iterator::reference boost::cb_details::iterator< Buff, Traits >::reference

Reference to the element.

◆ size_type

template<class Buff , class Traits >
typedef Traits::size_type boost::cb_details::iterator< Buff, Traits >::size_type

Size type.

◆ value_type

template<class Buff , class Traits >
typedef base_iterator::value_type boost::cb_details::iterator< Buff, Traits >::value_type

The type of the elements stored in the circular buffer.

Constructor & Destructor Documentation

◆ iterator() [1/3]

template<class Buff , class Traits >
boost::cb_details::iterator< Buff, Traits >::iterator ( )
inline

Default constructor.

◆ iterator() [2/3]

template<class Buff , class Traits >
boost::cb_details::iterator< Buff, Traits >::iterator ( const nonconst_self it)
inline

◆ iterator() [3/3]

template<class Buff , class Traits >
boost::cb_details::iterator< Buff, Traits >::iterator ( const Buff *  cb,
const pointer  p 
)
inline

Member Function Documentation

◆ create_helper_pointer()

template<class Buff , class Traits >
template<class Traits0 >
helper_pointer<Traits0> boost::cb_details::iterator< Buff, Traits >::create_helper_pointer ( const iterator< Buff, Traits0 > &  it) const
inlineprivate

Create helper pointer.

◆ less()

template<class Buff , class Traits >
template<class InternalIterator0 , class InternalIterator1 >
bool boost::cb_details::iterator< Buff, Traits >::less ( const InternalIterator0 &  lhs,
const InternalIterator1 &  rhs 
) const
inlineprivate

Less.

◆ operator!=()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator!= ( const iterator< Buff, Traits0 > &  it) const
inline

Inequality.

◆ operator*()

template<class Buff , class Traits >
reference boost::cb_details::iterator< Buff, Traits >::operator* ( ) const
inline

Dereferencing operator.

◆ operator+()

template<class Buff , class Traits >
iterator boost::cb_details::iterator< Buff, Traits >::operator+ ( difference_type  n) const
inline

Iterator addition.

◆ operator++() [1/2]

template<class Buff , class Traits >
iterator& boost::cb_details::iterator< Buff, Traits >::operator++ ( )
inline

Increment operator (prefix).

◆ operator++() [2/2]

template<class Buff , class Traits >
iterator boost::cb_details::iterator< Buff, Traits >::operator++ ( int  )
inline

Increment operator (postfix).

◆ operator+=()

template<class Buff , class Traits >
iterator& boost::cb_details::iterator< Buff, Traits >::operator+= ( difference_type  n)
inline

Iterator addition.

◆ operator-() [1/2]

template<class Buff , class Traits >
difference_type boost::cb_details::iterator< Buff, Traits >::operator- ( const iterator< Buff, Traits > &  it) const
inline

Difference operator.

◆ operator-() [2/2]

template<class Buff , class Traits >
iterator boost::cb_details::iterator< Buff, Traits >::operator- ( difference_type  n) const
inline

Iterator subtraction.

◆ operator--() [1/2]

template<class Buff , class Traits >
iterator& boost::cb_details::iterator< Buff, Traits >::operator-- ( )
inline

Decrement operator (prefix).

◆ operator--() [2/2]

template<class Buff , class Traits >
iterator boost::cb_details::iterator< Buff, Traits >::operator-- ( int  )
inline

Decrement operator (postfix).

◆ operator-=()

template<class Buff , class Traits >
iterator& boost::cb_details::iterator< Buff, Traits >::operator-= ( difference_type  n)
inline

Iterator subtraction.

◆ operator->()

template<class Buff , class Traits >
pointer boost::cb_details::iterator< Buff, Traits >::operator-> ( ) const
inline

Dereferencing operator.

◆ operator<()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator< ( const iterator< Buff, Traits0 > &  it) const
inline

Less.

◆ operator<=()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator<= ( const iterator< Buff, Traits0 > &  it) const
inline

Less or equal.

◆ operator=()

template<class Buff , class Traits >
iterator& boost::cb_details::iterator< Buff, Traits >::operator= ( const iterator< Buff, Traits > &  it)
inline

Assign operator.

◆ operator==()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator== ( const iterator< Buff, Traits0 > &  it) const
inline

Equality.

◆ operator>()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator> ( const iterator< Buff, Traits0 > &  it) const
inline

Greater.

◆ operator>=()

template<class Buff , class Traits >
template<class Traits0 >
bool boost::cb_details::iterator< Buff, Traits >::operator>= ( const iterator< Buff, Traits0 > &  it) const
inline

Greater or equal.

◆ operator[]()

template<class Buff , class Traits >
reference boost::cb_details::iterator< Buff, Traits >::operator[] ( difference_type  n) const
inline

Element access operator.

Member Data Documentation

◆ m_buff

template<class Buff , class Traits >
const Buff* boost::cb_details::iterator< Buff, Traits >::m_buff

The circular buffer where the iterator points to.

◆ m_it

template<class Buff , class Traits >
pointer boost::cb_details::iterator< Buff, Traits >::m_it

An internal iterator.


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