0.5.0
Loading...
Searching...
No Matches
NAV::ScrollingBuffer< T, _Padding >::ConstIterator Class Reference

Const 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

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

Private Attributes

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

Friends

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

Detailed Description

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

Const iterator.

Definition at line 200 of file ScrollingBuffer.hpp.

Member Typedef Documentation

◆ difference_type

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

Signed integer type (usually std::ptrdiff_t)

Definition at line 204 of file ScrollingBuffer.hpp.

◆ iterator_category

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

To categorize the iteration direction.

Definition at line 203 of file ScrollingBuffer.hpp.

◆ pointer

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

value_type*

Definition at line 206 of file ScrollingBuffer.hpp.

◆ reference

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

value_type&

Definition at line 207 of file ScrollingBuffer.hpp.

◆ value_type

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

T.

Definition at line 205 of file ScrollingBuffer.hpp.

Constructor & Destructor Documentation

◆ ConstIterator()

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

Constructor.

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

Definition at line 212 of file ScrollingBuffer.hpp.

Member Function Documentation

◆ operator*()

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

Returns a reference to the current element.

Definition at line 216 of file ScrollingBuffer.hpp.

◆ operator++() [1/2]

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

Advances the iterator.

Definition at line 221 of file ScrollingBuffer.hpp.

◆ operator++() [2/2]

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

Advances the iterator.

Definition at line 228 of file ScrollingBuffer.hpp.

◆ operator->()

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

Returns a pointer to the current element.

Definition at line 218 of file ScrollingBuffer.hpp.

◆ operator!=

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

Inequality comparison operator.

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

Definition at line 244 of file ScrollingBuffer.hpp.

◆ operator==

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

Equality comparison operator.

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

Definition at line 239 of file ScrollingBuffer.hpp.

Field Documentation

◆ buffer

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

Reference to the buffer.

Definition at line 247 of file ScrollingBuffer.hpp.

◆ index

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

Iterator index inside the buffer (counted from the start)

Definition at line 248 of file ScrollingBuffer.hpp.


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