Template Class RingBufferIterator
Defined in File RingBuffer.hpp
Class Documentation
Forward declaration.
RingBufferIterator is the random access iterator class used with the RingBuffer container.
Public Types
Type when taking the difference between two iterators.
Type of elements pointed to by the iterator.
Type to represent a pointer to an element pointed by the iterator.
Type to represent a reference to an element pointed by the iterator.
Category to which the iterator belongs.
Public Functions
Constructor.
- Parameters
buffer – the storage for the ring buffer
offset – iterator value used to index the buffer
capacity – size (number of elements) of buffer
Equal operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterators are equal
Not equal operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterators are not equal
Prefix increment operator.
- Returns
*this
Postfix increment operator.
- Returns
Iterator (by value)
Addition operator.
- Parameters
amount – to add
- Returns
Iterator (by value)
Subtraction operator.
- Parameters
amount – to subtract
- Returns
Iterator (by value)
Prefix decrement operator.
- Returns
*this
Postfix decrement operator.
- Returns
Iterator (by value)
Difference operator.
- Parameters
rhs – iterator to compare to
- Returns
Difference between iterator and rhs (iterator - rhs)
Addition assignment operator.
- Parameters
amount – to add to iterator
- Returns
Modified iterator (by reference)
Subtraction assignment operator.
- Parameters
amount – to subtract from iterator
- Returns
Modified iterator (by reference)
Less than operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterator is less than rhs (iterator < rhs)
Less than or equal to operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterator is less than or equal to rhs (iterator <= rhs)
Greater than operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterator is greater than rhs (iterator > rhs)
Greater than or equal to operator.
- Parameters
rhs – iterator to compare to
- Returns
trueif iterator is greater than or equal to rhs (iterator >= rhs)
- Parameters
index – of element from iterator
- Returns
Element at index (by reference)
- Returns
Element pointed to by iterator (by reference)
- Returns
Address of element pointed to by iterator