QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Classes | Public Member Functions | List of all members
QgsAbstractGeometry::vertex_iterator Class Reference

The vertex_iterator class provides STL-style iterator for vertices. More...

#include <qgsabstractgeometry.h>

Public Member Functions

 vertex_iterator ()=default
 Create invalid iterator. More...
 
 vertex_iterator (const QgsAbstractGeometry *g, int index)
 Create vertex iterator for a geometry. More...
 
bool operator!= (const vertex_iterator &other) const
 
QgsPoint operator* () const
 Returns the current item. More...
 
vertex_iteratoroperator++ ()
 The prefix ++ operator (++it) advances the iterator to the next vertex and returns an iterator to the new current vertex. More...
 
vertex_iterator operator++ (int)
 The postfix ++ operator (it++) advances the iterator to the next vertex and returns an iterator to the previously current vertex. More...
 
bool operator== (const vertex_iterator &other) const
 
QgsVertexId vertexId () const
 Returns vertex ID of the current item. More...
 

Detailed Description

The vertex_iterator class provides STL-style iterator for vertices.

Since
QGIS 3.0

Definition at line 924 of file qgsabstractgeometry.h.

Constructor & Destructor Documentation

◆ vertex_iterator() [1/2]

QgsAbstractGeometry::vertex_iterator::vertex_iterator ( )
default

Create invalid iterator.

◆ vertex_iterator() [2/2]

QgsAbstractGeometry::vertex_iterator::vertex_iterator ( const QgsAbstractGeometry g,
int  index 
)

Create vertex iterator for a geometry.

Definition at line 403 of file qgsabstractgeometry.cpp.

Member Function Documentation

◆ operator!=()

bool QgsAbstractGeometry::vertex_iterator::operator!= ( const vertex_iterator other) const
inline

Definition at line 969 of file qgsabstractgeometry.h.

◆ operator*()

QgsPoint QgsAbstractGeometry::vertex_iterator::operator* ( ) const

Returns the current item.

Definition at line 441 of file qgsabstractgeometry.cpp.

◆ operator++() [1/2]

QgsAbstractGeometry::vertex_iterator & QgsAbstractGeometry::vertex_iterator::operator++ ( )

The prefix ++ operator (++it) advances the iterator to the next vertex and returns an iterator to the new current vertex.

Calling this function on iterator that is already past the last item leads to undefined results.

Definition at line 413 of file qgsabstractgeometry.cpp.

◆ operator++() [2/2]

QgsAbstractGeometry::vertex_iterator QgsAbstractGeometry::vertex_iterator::operator++ ( int  )

The postfix ++ operator (it++) advances the iterator to the next vertex and returns an iterator to the previously current vertex.

Definition at line 434 of file qgsabstractgeometry.cpp.

◆ operator==()

bool QgsAbstractGeometry::vertex_iterator::operator== ( const vertex_iterator other) const

Definition at line 483 of file qgsabstractgeometry.cpp.

◆ vertexId()

QgsVertexId QgsAbstractGeometry::vertex_iterator::vertexId ( ) const

Returns vertex ID of the current item.

Definition at line 447 of file qgsabstractgeometry.cpp.


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