Custom iterator for StrideView. More...
#include <marvin_StrideView.h>
Public Types | |
using | value_type = T |
using | difference_type = std::ptrdiff_t |
using | pointer = T* |
using | reference = T& |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
iterator ()=delete | |
iterator (pointer ptr) | |
operator bool () const | |
reference | operator* () const |
pointer | operator-> () const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator-- () |
iterator | operator-- (int) |
iterator & | operator+= (difference_type n) |
iterator & | operator-= (difference_type n) |
Friends | |
bool | operator== (const iterator &lhs, const iterator &rhs) |
bool | operator!= (const iterator &lhs, const iterator &rhs) |
bool | operator< (const iterator &lhs, const iterator &rhs) |
bool | operator> (const iterator &lhs, const iterator &rhs) |
bool | operator<= (const iterator &lhs, const iterator &rhs) |
bool | operator>= (const iterator &lhs, const iterator &rhs) |
iterator | operator+ (const iterator &iter, difference_type n) |
iterator | operator+ (difference_type n, const iterator &iter) |
iterator | operator- (const iterator &iter, difference_type n) |
difference_type | operator- (const iterator &lhs, const iterator &rhs) |
Custom iterator for StrideView.
using marvin::containers::StrideView< T, Stride >::iterator::difference_type = std::ptrdiff_t |
using marvin::containers::StrideView< T, Stride >::iterator::iterator_category = std::forward_iterator_tag |
using marvin::containers::StrideView< T, Stride >::iterator::pointer = T* |
using marvin::containers::StrideView< T, Stride >::iterator::reference = T& |
using marvin::containers::StrideView< T, Stride >::iterator::value_type = T |
|
delete |
Default constructor doesn't make sense - would just be a nullptr waiting to happen.
|
inline |
Creates an iterator from a T*. Implicitly constructable.
ptr | A pointer to construct the iterator from. |
|
inline |
Checks the validity of the underlying pointer.
|
inline |
Dereferences the underlying pointer. Does not check for null.
|
inline |
Pre increments the underlying pointer, by Stride
steps.
|
inline |
Post increments the underlying pointer, by Stride
steps.
|
inline |
Adds n * Stride
to the underlying pointer.
n | The number of steps to add to the underlying pointer. |
|
inline |
Pre decrements the underlying pointer, by Stride
steps.
|
inline |
Post decrements the underlying pointer, by Stride
steps.
|
inline |
Subtracts n * Stride
from the underlying pointer.
n | The number of steps to subtract from the underlying pointer. |
|
inline |
Retrieves the underlying pointer.
|
friend |
Inequality operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |
|
friend |
Addition operator for an iterator and a difference_type.
iter | An iterator to modify |
n | A scalar to add to the underlying pointer of iter |
iter
, increased by n
.
|
friend |
Addition operator for a difference_type and an iterator.
n | A scalar to add to the underlying pointer of iter . |
iter | An iterator to modify. |
iter
, increased by n
.
|
friend |
Subtraction operator for an iterator and a difference type.
iter | An iterator to modify. |
n | A scalar to subtract from iter . |
iter
, decreased by n
.
|
friend |
Subtraction operator for two iterators.
lhs | A const iterator ref. |
rhs | A const iterator ref. |
|
friend |
Less than operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |
|
friend |
Less than or equal to operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |
|
friend |
Equality operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |
|
friend |
Greater than operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |
|
friend |
Greater than or equal to operator for two iterators.
lhs | A const ref to an iterator. |
rhs | A const ref to an iterator. |