MySQL 8.0.40
Source Code Documentation
|
Gis_wkb_vector_const_iterator is const_iterator class for Gis_wkb_vector, and base class of Gis_wkb_vector_iterator – iterator class for Gis_wkb_vector. More...
#include <spatial.h>
Public Types | |
typedef T | value_type |
typedef ptrdiff_t | difference_type |
typedef difference_type | distance_type |
typedef owner_t::size_type | size_type |
typedef value_type & | reference |
This is the return type for operator[]. More... | |
typedef value_type * | pointer |
typedef std::random_access_iterator_tag | iterator_category |
Public Member Functions | |
Constructors and destroctor | |
Do not construct iterators explicitly using these constructors, but call Gis_wkb_vector::begin() const to get an valid iterator.
| |
Gis_wkb_vector_const_iterator (const self &vi) | |
Gis_wkb_vector_const_iterator () | |
Gis_wkb_vector_const_iterator (index_type idx, const owner_t *owner) | |
~Gis_wkb_vector_const_iterator ()=default | |
Iterator comparison operators | |
The way to compare two iterators is to compare the index values of the two elements they point to. The iterator sitting on an element with less index is regarded to be smaller. And the invalid iterator sitting after last element is greater than any other iterators, because it is assumed to have an index equal to last element's index plus one; The invalid iterator sitting before first element is less than any other iterators because it is assumed to have an index -1. | |
bool | operator== (const self &itr) const |
Equality comparison operator. More... | |
bool | operator!= (const self &itr) const |
Unequal compare, identical to !operator(==itr) More... | |
bool | operator< (const self &itr) const |
Less than comparison operator. More... | |
bool | operator<= (const self &itr) const |
Less equal comparison operator. More... | |
bool | operator>= (const self &itr) const |
Greater equal comparison operator. More... | |
bool | operator> (const self &itr) const |
Greater comparison operator. More... | |
Iterator movement operators. | |
When we talk about iterator movement, we think the container is a uni-directional range, represented by [begin, end), and this is true no matter we are using iterators or reverse iterators. When an iterator is moved closer to "begin", we say it is moved backward, otherwise we say it is moved forward. | |
self & | operator++ () |
Pre-increment. More... | |
self | operator++ (int) |
Post-increment. More... | |
self & | operator-- () |
Pre-decrement. More... | |
self | operator-- (int) |
Post-decrement. More... | |
const self & | operator= (const self &itr) |
Assignment operator. More... | |
self | operator+ (difference_type n) const |
Iterator movement operator. More... | |
const self & | operator+= (difference_type n) |
Move this iterator forward by n elements. More... | |
self | operator- (difference_type n) const |
Iterator movement operator. More... | |
const self & | operator-= (difference_type n) |
Move this iterator backward by n elements. More... | |
difference_type | operator- (const self &itr) const |
Iterator distance operator. More... | |
Protected Types | |
typedef Gis_wkb_vector_const_iterator< T > | self |
typedef Gis_wkb_vector< T > | owner_t |
typedef ptrdiff_t | index_type |
Functions that retrieve values from the iterator. | |
index_type | m_curidx |
Current element's index, starting from 0. More... | |
owner_t * | m_owner |
The owner container of this iteraotr. More... | |
reference | operator* () const |
Dereference operator. More... | |
pointer | operator-> () const |
Arrow operator. More... | |
reference | operator[] (difference_type offset) const |
Iterator index operator. More... | |
void | move_by (self &itr, difference_type n, bool back) const |
Gis_wkb_vector_const_iterator is const_iterator class for Gis_wkb_vector, and base class of Gis_wkb_vector_iterator – iterator class for Gis_wkb_vector.
T | Vector element type |
typedef ptrdiff_t Gis_wkb_vector_const_iterator< T >::difference_type |
typedef difference_type Gis_wkb_vector_const_iterator< T >::distance_type |
|
protected |
typedef std::random_access_iterator_tag Gis_wkb_vector_const_iterator< T >::iterator_category |
|
protected |
typedef value_type* Gis_wkb_vector_const_iterator< T >::pointer |
typedef value_type& Gis_wkb_vector_const_iterator< T >::reference |
This is the return type for operator[].
|
protected |
typedef owner_t::size_type Gis_wkb_vector_const_iterator< T >::size_type |
typedef T Gis_wkb_vector_const_iterator< T >::value_type |
|
inline |
|
inline |
|
inline |
|
default |
|
inlineprotected |
|
inline |
Unequal compare, identical to !operator(==itr)
itr | The iterator to compare against. |
|
inline |
Dereference operator.
Return the reference to the cached data element. The returned value can only be used to read its referenced element.
|
inline |
Iterator movement operator.
Return another iterator by moving this iterator forward by n elements.
n | The amount and direction of movement. If negative, will move backward by |n| element. |
|
inline |
Pre-increment.
Move the iterator one element forward, so that the element it sits on has a bigger index. Use ++iter rather than iter++ where possible to avoid two useless iterator copy constructions.
|
inline |
Post-increment.
Move the iterator one element forward, so that the element it sits on has a bigger index. Use ++iter rather than iter++ where possible to avoid two useless iterator copy constructions.
|
inline |
Move this iterator forward by n elements.
n | The amount and direction of movement. If negative, will move backward by |n| element. |
|
inline |
Iterator distance operator.
Return the index difference of this iterator and itr, so if this iterator sits on an element with a smaller index, this call will return a negative number.
itr | The other iterator to subtract. itr can be the invalid iterator after last element or before first element, their index will be regarded as last element's index + 1 and -1 respectively. |
|
inline |
Iterator movement operator.
Return another iterator by moving this iterator backward by n elements.
n | The amount and direction of movement. If negative, will move forward by |n| element. |
|
inline |
Pre-decrement.
Move the iterator one element backward, so that the element it sits on has a smaller index. Use –iter rather than iter– where possible to avoid two useless iterator copy constructions.
|
inline |
Post-decrement.
Move the iterator one element backward, so that the element it sits on has a smaller index. Use –iter rather than iter– where possible to avoid two useless iterator copy constructions.
|
inline |
Move this iterator backward by n elements.
n | The amount and direction of movement. If negative, will move forward by |n| element. |
|
inline |
Arrow operator.
Return the pointer to the cached data element. The returned value can only be used to read its referenced element.
|
inline |
Less than comparison operator.
itr | The iterator to compare against. |
|
inline |
Less equal comparison operator.
itr | The iterator to compare against. |
|
inline |
Assignment operator.
This iterator will point to the same key/data pair as itr, and have the same configurations as itr.
itr | The right value of the assignment. |
|
inline |
Equality comparison operator.
Invalid iterators are equal; Valid iterators sitting on the same key/data pair equal; Otherwise not equal.
itr | The iterator to compare against. |
|
inline |
Greater comparison operator.
itr | The iterator to compare against. |
|
inline |
Greater equal comparison operator.
itr | The iterator to compare against. |
|
inline |
Iterator index operator.
offset | The offset of target element relative to this iterator. |
|
protected |
Current element's index, starting from 0.
|
protected |
The owner container of this iteraotr.