|
Blender V4.3
|
#include <BLI_random_access_iterator_mixin.hh>
Public Types | |
| using | iterator_category = std::random_access_iterator_tag |
| using | difference_type = std::ptrdiff_t |
Public Member Functions | |
| constexpr decltype(auto) | operator[] (const std::ptrdiff_t i) |
| constexpr decltype(auto) | operator[] (const std::ptrdiff_t i) const |
| auto & | iter_prop_mutable () |
Friends | |
| constexpr friend Derived & | operator++ (Derived &a) |
| constexpr friend Derived | operator++ (Derived &a, int) |
| constexpr friend Derived & | operator-- (Derived &a) |
| constexpr friend Derived | operator-- (Derived &a, int) |
| constexpr friend Derived & | operator+= (Derived &a, const std::ptrdiff_t n) |
| constexpr friend Derived & | operator-= (Derived &a, const std::ptrdiff_t n) |
| constexpr friend Derived | operator+ (const Derived &a, const std::ptrdiff_t n) |
| constexpr friend Derived | operator- (const Derived &a, const std::ptrdiff_t n) |
| constexpr friend auto | operator- (const Derived &a, const Derived &b) |
| constexpr friend bool | operator!= (const Derived &a, const Derived &b) |
| constexpr friend bool | operator== (const Derived &a, const Derived &b) |
| constexpr friend bool | operator< (const Derived &a, const Derived &b) |
| constexpr friend bool | operator> (const Derived &a, const Derived &b) |
| constexpr friend bool | operator<= (const Derived &a, const Derived &b) |
| constexpr friend bool | operator>= (const Derived &a, const Derived &b) |
Simplifies implementing a random-access-iterator.
The actual iterator should derive from this class publicly. Additionally, it has to provide a const iter_prop method which returns a reference to the internal property that corresponds to the current position. This is typically a pointer or an index.
Implementing some random-access-iterator is generally quite simple but requires a lot of boilerplate code because algorithms expect many operators to work on the iterator type. They are expected to behave similarly to pointers and thus have to implement many of the same operators.
Definition at line 23 of file BLI_random_access_iterator_mixin.hh.
| using blender::iterator::RandomAccessIteratorMixin< Derived >::difference_type = std::ptrdiff_t |
Definition at line 26 of file BLI_random_access_iterator_mixin.hh.
| using blender::iterator::RandomAccessIteratorMixin< Derived >::iterator_category = std::random_access_iterator_tag |
Definition at line 25 of file BLI_random_access_iterator_mixin.hh.
|
inline |
Definition at line 125 of file BLI_random_access_iterator_mixin.hh.
|
inlineconstexpr |
Definition at line 115 of file BLI_random_access_iterator_mixin.hh.
|
inlineconstexpr |
Definition at line 120 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 85 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 66 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 28 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 34 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 54 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 80 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 73 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 41 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 47 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 60 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 95 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 105 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 90 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 100 of file BLI_random_access_iterator_mixin.hh.
|
friend |
Definition at line 110 of file BLI_random_access_iterator_mixin.hh.