Custom const_iterator for a StrideView.
More...
#include <marvin_StrideView.h>
|
bool | operator== (const const_iterator &lhs, const const_iterator &rhs) |
|
bool | operator!= (const const_iterator &lhs, const const_iterator &rhs) |
|
bool | operator< (const const_iterator &lhs, const const_iterator &rhs) |
|
bool | operator> (const const_iterator &lhs, const const_iterator &rhs) |
|
bool | operator<= (const const_iterator &lhs, const const_iterator &rhs) |
|
bool | operator>= (const const_iterator &lhs, const const_iterator &rhs) |
|
const_iterator | operator+ (const const_iterator &iter, difference_type n) |
|
const_iterator | operator+ (difference_type n, const const_iterator &iter) |
|
const_iterator | operator- (const const_iterator &iter, difference_type n) |
|
const_iterator | operator- (const const_iterator &lhs, const const_iterator &rhs) |
|
template<typename T, size_t Stride>
class marvin::containers::StrideView< T, Stride >::const_iterator
Custom const_iterator for a StrideView.
◆ difference_type
template<typename T, size_t Stride>
◆ iterator_category
template<typename T, size_t Stride>
◆ pointer
template<typename T, size_t Stride>
◆ reference
template<typename T, size_t Stride>
◆ value_type
template<typename T, size_t Stride>
◆ const_iterator() [1/2]
template<typename T, size_t Stride>
Default constructor doesn't make sense - would just be a nullptr waiting to happen.
◆ const_iterator() [2/2]
template<typename T, size_t Stride>
Creates a const_iterator from a T*. Implicitly constructable.
- Parameters
-
◆ operator bool()
template<typename T, size_t Stride>
Checks the validity of the underlying pointer.
- Returns
- true if the underlying pointer is not null, false otherwise.
◆ operator*()
template<typename T, size_t Stride>
Dereferences the underlying pointer. Does not check for null.
- Returns
- A const reference to the value stored at the underlying pointer.
◆ operator++() [1/2]
template<typename T, size_t Stride>
Pre increments the underlying pointer, by Stride
steps.
- Returns
- A const_iterator to the incremented underlying pointer (*this).
◆ operator++() [2/2]
template<typename T, size_t Stride>
Post increments the underlying pointer, by Stride
steps.
- Returns
- A const_iterator to the previous state of the internal pointer, before the increment.
◆ operator+=()
template<typename T, size_t Stride>
Adds n * Stride
to the underlying pointer.
- Parameters
-
n | The number of steps to add to the underlying pointer. |
- Returns
- A const_iterator to the modified underlying pointer (*this).
◆ operator--() [1/2]
template<typename T, size_t Stride>
Pre decrements the underlying pointer, by Stride
steps.
- Returns
- A const_iterator to the decremented underlying pointer (*this).
◆ operator--() [2/2]
template<typename T, size_t Stride>
Post decrements the underlying pointer, by Stride
steps.
- Returns
- A const_iterator to the previous state of the internal pointer, before the decrement.
◆ operator-=()
template<typename T, size_t Stride>
Subtracts n * Stride
from the underlying pointer.
- Parameters
-
n | The number of steps to subtract from the underlying pointer. |
- Returns
- A const_iterator to the modified underlying pointer (*this).
◆ operator->()
template<typename T, size_t Stride>
Retrieves the underlying pointer.
- Returns
- The pointer (to const) wrapped by this const_iterator.
◆ operator!=
template<typename T, size_t Stride>
Inequality operator for two const_iterators.
- Parameters
-
- Returns
- true if the underlying pointers are not equal, false otherwise.
◆ operator+ [1/2]
template<typename T, size_t Stride>
◆ operator+ [2/2]
template<typename T, size_t Stride>
Subtraction operator for an const_iterator and a difference type.
- Parameters
-
- Returns
- A modified copy of
iter
, decreased by n
.
◆ operator- [1/2]
template<typename T, size_t Stride>
Subtraction operator for an const_iterator and a difference type.
- Parameters
-
- Returns
- A modified copy of
iter
, decreased by n
.
◆ operator- [2/2]
template<typename T, size_t Stride>
Subtraction operator for two const_iterators.
- Parameters
-
- Returns
- The internal pointer of rhs subtracted from the internal pointer of rhs.
◆ operator<
template<typename T, size_t Stride>
Less than operator for two const_iterators.
- Parameters
-
- Returns
- true if lhs' underlying pointer is less than rhs' underlying pointer, false otherwise.
◆ operator<=
template<typename T, size_t Stride>
Less than or equal to operator for two const_iterators.
- Parameters
-
- Returns
- true if lhs' underlying pointer is less than or equal to rhs' underlying pointer, false otherwise.
◆ operator==
template<typename T, size_t Stride>
Equality operator for two const_iterators.
- Parameters
-
- Returns
- true if the underlying pointers are equal, false otherwise.
◆ operator>
template<typename T, size_t Stride>
Greater than operator for two const_iterators.
- Parameters
-
- Returns
- true if lhs' underlying pointer is greater than rhs' underlying pointer, false otherwise.
◆ operator>=
template<typename T, size_t Stride>
Greater than or equal to operator for two const_iterators.
- Parameters
-
- Returns
- true if lhs' underlying pointer is greater than or equal to rhs' underlying pointer, false otherwise.
The documentation for this class was generated from the following file:
- /home/runner/work/mostly-harmless/mostly-harmless/modules/marvin/include/marvin/containers/marvin_StrideView.h