MySQL 8.3.0
Source Code Documentation
Gis_wkb_vector_iterator< T > Class Template Reference

This class is the iterator class for Gis_wkb_vector, its instances can be used to mutate their referenced data element. More...

#include <spatial.h>

Inheritance diagram for Gis_wkb_vector_iterator< T >:
[legend]

Public Types

typedef ptrdiff_t index_type
 
typedef T value_type
 
typedef ptrdiff_t difference_type
 
typedef difference_type distance_type
 
typedef value_typereference
 
typedef value_typepointer
 
typedef std::random_access_iterator_tag iterator_category
 
- Public Types inherited from Gis_wkb_vector_const_iterator< T >
typedef T value_type
 
typedef ptrdiff_t difference_type
 
typedef difference_type distance_type
 
typedef owner_t::size_type size_type
 
typedef value_typereference
 This is the return type for operator[]. More...
 
typedef value_typepointer
 
typedef std::random_access_iterator_tag iterator_category
 

Public Member Functions

Constructors and destructor

Begin public constructors and destructor.

Do not construct iterators explicitly using these constructors, but call Gis_wkb_vector::begin to get a valid iterator.

See also
Gis_wkb_vector::begin
 Gis_wkb_vector_iterator (const self &vi)
 
 Gis_wkb_vector_iterator ()
 
 Gis_wkb_vector_iterator (const base &obj)
 
 Gis_wkb_vector_iterator (index_type idx, const owner_t *owner)
 
 ~Gis_wkb_vector_iterator ()=default
 
Iterator movement operators.

Begin functions that shift the iterator position.

These functions are identical to those defined in Gis_wkb_vector_const_iterator, but we have to redefine them here because the "self" have different definitions.

These functions have identical behaviors and semantics as those of Gis_wkb_vector_const_iterator, so please refer to equivalent in that class.

selfoperator++ ()
 Pre-increment. More...
 
self operator++ (int)
 Post-increment. More...
 
selfoperator-- ()
 Pre-decrement. More...
 
self operator-- (int)
 Post-decrement. More...
 
const selfoperator= (const self &itr)
 Assignment operator. More...
 
self operator+ (difference_type n) const
 Iterator movement operator. More...
 
const selfoperator+= (difference_type n)
 Move this iterator backward by n elements. More...
 
self operator- (difference_type n) const
 Iterator movement operator. More...
 
const selfoperator-= (difference_type n)
 Move this iterator forward by n elements. More...
 
difference_type operator- (const self &itr) const
 Iterator distance operator. More...
 
Functions that retrieve values from the iterator.
reference operator* () const
 Dereference operator. More...
 
pointer operator-> () const
 Arrow operator. More...
 
reference operator[] (difference_type offset) const
 Iterator index operator. More...
 
- Public Member Functions inherited from Gis_wkb_vector_const_iterator< T >
 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
 
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...
 
selfoperator++ ()
 Pre-increment. More...
 
self operator++ (int)
 Post-increment. More...
 
selfoperator-- ()
 Pre-decrement. More...
 
self operator-- (int)
 Post-decrement. More...
 
const selfoperator= (const self &itr)
 Assignment operator. More...
 
self operator+ (difference_type n) const
 Iterator movement operator. More...
 
const selfoperator+= (difference_type n)
 Move this iterator forward by n elements. More...
 
self operator- (difference_type n) const
 Iterator movement operator. More...
 
const selfoperator-= (difference_type n)
 Move this iterator backward by n elements. More...
 
difference_type operator- (const self &itr) const
 Iterator distance operator. More...
 
reference operator* () const
 Dereference operator. More...
 
pointer operator-> () const
 Arrow operator. More...
 
reference operator[] (difference_type offset) const
 Iterator index operator. More...
 

Protected Types

typedef Gis_wkb_vector_iterator< T > self
 
typedef Gis_wkb_vector_const_iterator< T > base
 
typedef Gis_wkb_vector< T > owner_t
 
- Protected Types inherited from Gis_wkb_vector_const_iterator< T >
typedef Gis_wkb_vector_const_iterator< T > self
 
typedef Gis_wkb_vector< T > owner_t
 
typedef ptrdiff_t index_type
 

Additional Inherited Members

- Protected Member Functions inherited from Gis_wkb_vector_const_iterator< T >
void move_by (self &itr, difference_type n, bool back) const
 
- Protected Attributes inherited from Gis_wkb_vector_const_iterator< T >
index_type m_curidx
 Current element's index, starting from 0. More...
 
owner_tm_owner
 The owner container of this iteraotr. More...
 

Detailed Description

template<class T>
class Gis_wkb_vector_iterator< T >

This class is the iterator class for Gis_wkb_vector, its instances can be used to mutate their referenced data element.

Template Parameters
TVector element type

Member Typedef Documentation

◆ base

template<class T >
typedef Gis_wkb_vector_const_iterator<T> Gis_wkb_vector_iterator< T >::base
protected

◆ difference_type

template<class T >
typedef ptrdiff_t Gis_wkb_vector_iterator< T >::difference_type

◆ distance_type

template<class T >
typedef difference_type Gis_wkb_vector_iterator< T >::distance_type

◆ index_type

template<class T >
typedef ptrdiff_t Gis_wkb_vector_iterator< T >::index_type

◆ iterator_category

template<class T >
typedef std::random_access_iterator_tag Gis_wkb_vector_iterator< T >::iterator_category

◆ owner_t

template<class T >
typedef Gis_wkb_vector<T> Gis_wkb_vector_iterator< T >::owner_t
protected

◆ pointer

template<class T >
typedef value_type* Gis_wkb_vector_iterator< T >::pointer

◆ reference

template<class T >
typedef value_type& Gis_wkb_vector_iterator< T >::reference

◆ self

template<class T >
typedef Gis_wkb_vector_iterator<T> Gis_wkb_vector_iterator< T >::self
protected

◆ value_type

template<class T >
typedef T Gis_wkb_vector_iterator< T >::value_type

Constructor & Destructor Documentation

◆ Gis_wkb_vector_iterator() [1/4]

template<class T >
Gis_wkb_vector_iterator< T >::Gis_wkb_vector_iterator ( const self vi)
inline

◆ Gis_wkb_vector_iterator() [2/4]

template<class T >
Gis_wkb_vector_iterator< T >::Gis_wkb_vector_iterator ( )
inline

◆ Gis_wkb_vector_iterator() [3/4]

template<class T >
Gis_wkb_vector_iterator< T >::Gis_wkb_vector_iterator ( const base obj)
inline

◆ Gis_wkb_vector_iterator() [4/4]

template<class T >
Gis_wkb_vector_iterator< T >::Gis_wkb_vector_iterator ( index_type  idx,
const owner_t owner 
)
inline

◆ ~Gis_wkb_vector_iterator()

template<class T >
Gis_wkb_vector_iterator< T >::~Gis_wkb_vector_iterator ( )
default

Member Function Documentation

◆ operator*()

template<class T >
reference Gis_wkb_vector_iterator< T >::operator* ( ) const
inline

Dereference operator.

Return the reference to the cached data element The returned value can be used to read or update its referenced element.

Returns
The reference to the element this iterator points to.

◆ operator+()

template<class T >
self Gis_wkb_vector_iterator< T >::operator+ ( difference_type  n) const
inline

Iterator movement operator.

Return another iterator by moving this iterator backward by n elements.

Parameters
nThe amount and direction of movement. If negative, will move forward by |n| element.
Returns
The new iterator at new position.
See also
Gis_wkb_vector_const_iterator::operator+(difference_type n) const

◆ operator++() [1/2]

template<class T >
self & Gis_wkb_vector_iterator< T >::operator++ ( )
inline

Pre-increment.

Returns
This iterator after incremented.
See also
Gis_wkb_vector_const_iterator::operator++()

◆ operator++() [2/2]

template<class T >
self Gis_wkb_vector_iterator< T >::operator++ ( int  )
inline

Post-increment.

Returns
A new iterator not incremented.
See also
Gis_wkb_vector_const_iterator::operator++(int)

◆ operator+=()

template<class T >
const self & Gis_wkb_vector_iterator< T >::operator+= ( difference_type  n)
inline

Move this iterator backward by n elements.

Parameters
nThe amount and direction of movement. If negative, will move forward by |n| element.
Returns
Reference to this iterator at new position.
See also
Gis_wkb_vector_const_iterator::operator+=(difference_type n)

◆ operator-() [1/2]

template<class T >
difference_type Gis_wkb_vector_iterator< T >::operator- ( const self itr) const
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.

Parameters
itrThe 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.
Returns
The index difference.
See also
Gis_wkb_vector_const_iterator::operator-(const self &itr) const

◆ operator-() [2/2]

template<class T >
self Gis_wkb_vector_iterator< T >::operator- ( difference_type  n) const
inline

Iterator movement operator.

Return another iterator by moving this iterator forward by n elements.

Parameters
nThe amount and direction of movement. If negative, will move backward by |n| element.
Returns
The new iterator at new position.
See also
Gis_wkb_vector_const_iterator::operator-(difference_type n) const

◆ operator--() [1/2]

template<class T >
self & Gis_wkb_vector_iterator< T >::operator-- ( )
inline

Pre-decrement.

Returns
This iterator after decremented.
See also
Gis_wkb_vector_const_iterator::operator--()

◆ operator--() [2/2]

template<class T >
self Gis_wkb_vector_iterator< T >::operator-- ( int  )
inline

Post-decrement.

Returns
A new iterator not decremented.
See also
Gis_wkb_vector_const_iterator::operator--(int)

◆ operator-=()

template<class T >
const self & Gis_wkb_vector_iterator< T >::operator-= ( difference_type  n)
inline

Move this iterator forward by n elements.

Parameters
nThe amount and direction of movement. If negative, will move backward by |n| element.
Returns
Reference to this iterator at new position.
See also
Gis_wkb_vector_const_iterator::operator-=(difference_type n)

◆ operator->()

template<class T >
pointer Gis_wkb_vector_iterator< T >::operator-> ( ) const
inline

Arrow operator.

Return the pointer to the cached data element The returned value can be used to read or update its referenced element.

Returns
The address of the referenced object.

◆ operator=()

template<class T >
const self & Gis_wkb_vector_iterator< T >::operator= ( const self itr)
inline

Assignment operator.

This iterator will point to the same key/data pair as itr, and have the same configurations as itr.

Parameters
itrThe right value of the assignment.
Returns
This iterator's reference.

◆ operator[]()

template<class T >
reference Gis_wkb_vector_iterator< T >::operator[] ( difference_type  offset) const
inline

Iterator index operator.

Parameters
offsetThe offset of target element relative to this iterator.
Returns
Return the element which is at position *this + offset. The returned value can be used to read or update its referenced element.

The documentation for this class was generated from the following file: