0.4.1
Loading...
Searching...
No Matches
NAV::ScrollingBuffer< T, _Padding >::Iterator Class Reference

Iterator. More...

Public Types

using difference_type
 Signed integer type (usually std::ptrdiff_t)
 
using iterator_category
 To categorize the iteration direction.
 
using pointer
 value_type*
 
using reference
 value_type&
 
using value_type
 T.
 

Public Member Functions

 Iterator (ScrollingBuffer &buffer, size_t index=0)
 Constructor.
 
reference operator* () const
 Returns a reference to the current element.
 
Iteratoroperator++ ()
 Advances the iterator.
 
Iterator operator++ (int)
 Advances the iterator.
 
pointer operator-> ()
 Returns a pointer to the current element.
 

Private Attributes

ScrollingBufferbuffer
 Reference to the buffer.
 
size_t index
 Iterator index inside the buffer (counted from the start)
 

Friends

bool operator!= (const Iterator &lhs, const Iterator &rhs)
 Inequality comparison operator.
 
bool operator== (const Iterator &lhs, const Iterator &rhs)
 Equality comparison operator.
 

Detailed Description

template<class T, size_t _Padding = 0>
class NAV::ScrollingBuffer< T, _Padding >::Iterator

Iterator.

Definition at line 139 of file ScrollingBuffer.hpp.

Member Typedef Documentation

◆ difference_type

template<class T, size_t _Padding = 0>
using NAV::ScrollingBuffer< T, _Padding >::Iterator::difference_type

Signed integer type (usually std::ptrdiff_t)

Definition at line 143 of file ScrollingBuffer.hpp.

◆ iterator_category

template<class T, size_t _Padding = 0>
using NAV::ScrollingBuffer< T, _Padding >::Iterator::iterator_category

To categorize the iteration direction.

Definition at line 142 of file ScrollingBuffer.hpp.

◆ pointer

template<class T, size_t _Padding = 0>
using NAV::ScrollingBuffer< T, _Padding >::Iterator::pointer

value_type*

Definition at line 145 of file ScrollingBuffer.hpp.

◆ reference

template<class T, size_t _Padding = 0>
using NAV::ScrollingBuffer< T, _Padding >::Iterator::reference

value_type&

Definition at line 146 of file ScrollingBuffer.hpp.

◆ value_type

template<class T, size_t _Padding = 0>
using NAV::ScrollingBuffer< T, _Padding >::Iterator::value_type

T.

Definition at line 144 of file ScrollingBuffer.hpp.

Constructor & Destructor Documentation

◆ Iterator()

template<class T, size_t _Padding = 0>
NAV::ScrollingBuffer< T, _Padding >::Iterator::Iterator ( ScrollingBuffer & buffer,
size_t index = 0 )
inlineexplicit

Constructor.

Parameters
[in]bufferMutable reference to the buffer of the iterator
[in]indexIterator index inside the buffer (counted from the start)

Definition at line 151 of file ScrollingBuffer.hpp.

Member Function Documentation

◆ operator*()

template<class T, size_t _Padding = 0>
reference NAV::ScrollingBuffer< T, _Padding >::Iterator::operator* ( ) const
inline

Returns a reference to the current element.

Definition at line 155 of file ScrollingBuffer.hpp.

◆ operator++() [1/2]

template<class T, size_t _Padding = 0>
Iterator & NAV::ScrollingBuffer< T, _Padding >::Iterator::operator++ ( )
inline

Advances the iterator.

Definition at line 160 of file ScrollingBuffer.hpp.

◆ operator++() [2/2]

template<class T, size_t _Padding = 0>
Iterator NAV::ScrollingBuffer< T, _Padding >::Iterator::operator++ ( int )
inline

Advances the iterator.

Definition at line 167 of file ScrollingBuffer.hpp.

◆ operator->()

template<class T, size_t _Padding = 0>
pointer NAV::ScrollingBuffer< T, _Padding >::Iterator::operator-> ( )
inline

Returns a pointer to the current element.

Definition at line 157 of file ScrollingBuffer.hpp.

Friends And Related Symbol Documentation

◆ operator!=

template<class T, size_t _Padding = 0>
bool operator!= ( const Iterator & lhs,
const Iterator & rhs )
friend

Inequality comparison operator.

Parameters
[in]lhsLeft-hand side
[in]rhsRight-hand side
Returns
False if elements are equal

Definition at line 183 of file ScrollingBuffer.hpp.

◆ operator==

template<class T, size_t _Padding = 0>
bool operator== ( const Iterator & lhs,
const Iterator & rhs )
friend

Equality comparison operator.

Parameters
[in]lhsLeft-hand side
[in]rhsRight-hand side
Returns
True if elements are equal

Definition at line 178 of file ScrollingBuffer.hpp.

Field Documentation

◆ buffer

template<class T, size_t _Padding = 0>
ScrollingBuffer& NAV::ScrollingBuffer< T, _Padding >::Iterator::buffer
private

Reference to the buffer.

Definition at line 186 of file ScrollingBuffer.hpp.

◆ index

template<class T, size_t _Padding = 0>
size_t NAV::ScrollingBuffer< T, _Padding >::Iterator::index
private

Iterator index inside the buffer (counted from the start)

Definition at line 187 of file ScrollingBuffer.hpp.


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