|
Stratax 0.4.0rc1
|
Random-access iterator over logical flat indices of a view. More...
#include <ArrayView.hpp>
Public Types | |
| using | iterator_concept = std::random_access_iterator_tag |
| C++20 random-access iterator concept tag. | |
| using | iterator_category = std::random_access_iterator_tag |
| Legacy random-access iterator category tag. | |
| using | value_type = ArrayView::value_type |
| Unqualified element type. | |
| using | difference_type = std::ptrdiff_t |
| Signed iterator-distance type. | |
| using | reference = std::conditional_t< IsConst, const_reference, ArrayView::reference > |
| Element reference with the iterator constness. | |
Public Member Functions | |
| basic_iterator ()=default | |
| Constructs a singular iterator. | |
| basic_iterator (view_type *view, size_type index) noexcept | |
| Constructs an iterator at a logical flat index, including the end position. | |
| template<bool OtherConst> requires (IsConst && !OtherConst) | |
| basic_iterator (const basic_iterator< OtherConst > &other) noexcept | |
| Converts a mutable iterator to a read-only iterator. | |
| reference | operator* () const |
| Returns the element at the current logical position. | |
| reference | operator[] (difference_type offset) const |
| Returns the element at a relative logical offset. | |
| basic_iterator & | operator++ () |
| Advances one position and returns this iterator. | |
| basic_iterator | operator++ (int) |
| Advances one position and returns the previous iterator. | |
| basic_iterator & | operator-- () |
| Moves back one position and returns this iterator. | |
| basic_iterator | operator-- (int) |
| Moves back one position and returns the previous iterator. | |
| basic_iterator & | operator+= (difference_type offset) |
| Advances by a signed offset and returns this iterator. | |
| basic_iterator & | operator-= (difference_type offset) |
| Moves back by a signed offset and returns this iterator. | |
Friends | |
| basic_iterator | operator+ (basic_iterator iterator, difference_type offset) |
| Returns an iterator advanced by a signed offset. | |
| basic_iterator | operator+ (difference_type offset, basic_iterator iterator) |
| Returns an iterator advanced by a signed offset. | |
| basic_iterator | operator- (basic_iterator iterator, difference_type offset) |
| Returns an iterator moved back by a signed offset. | |
| difference_type | operator- (const basic_iterator &lhs, const basic_iterator &rhs) |
| Returns the signed logical distance between iterators into the same view. | |
| bool | operator== (const basic_iterator &, const basic_iterator &)=default |
| Compares both the view identity and logical position. | |
| auto | operator<=> (const basic_iterator &lhs, const basic_iterator &rhs) |
| Orders logical positions within the same view. | |
Random-access iterator over logical flat indices of a view.
| IsConst | Whether dereferencing provides read-only access. |
Definition at line 70 of file ArrayView.hpp.
| using stratax::core::ArrayView< T >::basic_iterator< IsConst >::difference_type = std::ptrdiff_t |
Signed iterator-distance type.
Definition at line 86 of file ArrayView.hpp.
| using stratax::core::ArrayView< T >::basic_iterator< IsConst >::iterator_category = std::random_access_iterator_tag |
Legacy random-access iterator category tag.
Definition at line 82 of file ArrayView.hpp.
| using stratax::core::ArrayView< T >::basic_iterator< IsConst >::iterator_concept = std::random_access_iterator_tag |
C++20 random-access iterator concept tag.
Definition at line 80 of file ArrayView.hpp.
| using stratax::core::ArrayView< T >::basic_iterator< IsConst >::reference = std::conditional_t<IsConst, const_reference, ArrayView::reference> |
Element reference with the iterator constness.
Definition at line 88 of file ArrayView.hpp.
| using stratax::core::ArrayView< T >::basic_iterator< IsConst >::value_type = ArrayView::value_type |
Unqualified element type.
Definition at line 84 of file ArrayView.hpp.
|
inlinenoexcept |
Constructs an iterator at a logical flat index, including the end position.
Definition at line 93 of file ArrayView.hpp.
|
inlinenoexcept |
Converts a mutable iterator to a read-only iterator.
Definition at line 100 of file ArrayView.hpp.
|
inline |
Returns the element at the current logical position.
Definition at line 105 of file ArrayView.hpp.
|
inline |
Advances one position and returns this iterator.
Definition at line 110 of file ArrayView.hpp.
|
inline |
Advances one position and returns the previous iterator.
Definition at line 112 of file ArrayView.hpp.
|
inline |
Advances by a signed offset and returns this iterator.
Definition at line 119 of file ArrayView.hpp.
|
inline |
Moves back one position and returns this iterator.
Definition at line 114 of file ArrayView.hpp.
|
inline |
Moves back one position and returns the previous iterator.
Definition at line 116 of file ArrayView.hpp.
|
inline |
Moves back by a signed offset and returns this iterator.
Definition at line 126 of file ArrayView.hpp.
|
inline |
Returns the element at a relative logical offset.
Definition at line 107 of file ArrayView.hpp.
Definition at line 164 of file ArrayView.hpp.
|
friend |
Returns an iterator advanced by a signed offset.
Definition at line 129 of file ArrayView.hpp.
|
friend |
Returns an iterator advanced by a signed offset.
Definition at line 136 of file ArrayView.hpp.
|
friend |
Returns an iterator moved back by a signed offset.
Definition at line 142 of file ArrayView.hpp.
|
friend |
Returns the signed logical distance between iterators into the same view.
Definition at line 149 of file ArrayView.hpp.
|
friend |
Orders logical positions within the same view.
Definition at line 158 of file ArrayView.hpp.