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

The part_iterator class provides STL-style iterator for geometry parts. More...

#include <qgsabstractgeometry.h>

Public Member Functions

 part_iterator ()=default
 Create invalid iterator. More...
 
 part_iterator (QgsAbstractGeometry *g, int index)
 Create part iterator for a geometry. More...
 
bool operator!= (part_iterator other) const
 
QgsAbstractGeometryoperator* () const
 Returns the current item. More...
 
part_iteratoroperator++ ()
 The prefix ++ operator (++it) advances the iterator to the next part and returns an iterator to the new current part. More...
 
part_iterator operator++ (int)
 The postfix ++ operator (it++) advances the iterator to the next part and returns an iterator to the previously current part. More...
 
bool operator== (part_iterator other) const
 
int partNumber () const
 Returns the part number of the current item. More...
 

Detailed Description

The part_iterator class provides STL-style iterator for geometry parts.

Since
QGIS 3.6

Definition at line 794 of file qgsabstractgeometry.h.

Constructor & Destructor Documentation

◆ part_iterator() [1/2]

QgsAbstractGeometry::part_iterator::part_iterator ( )
default

Create invalid iterator.

◆ part_iterator() [2/2]

QgsAbstractGeometry::part_iterator::part_iterator ( QgsAbstractGeometry g,
int  index 
)

Create part iterator for a geometry.

Definition at line 511 of file qgsabstractgeometry.cpp.

Member Function Documentation

◆ operator!=()

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

Definition at line 824 of file qgsabstractgeometry.h.

◆ operator*()

QgsAbstractGeometry * QgsAbstractGeometry::part_iterator::operator* ( ) const

Returns the current item.

Definition at line 540 of file qgsabstractgeometry.cpp.

◆ operator++() [1/2]

QgsAbstractGeometry::part_iterator & QgsAbstractGeometry::part_iterator::operator++ ( )

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

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

Definition at line 517 of file qgsabstractgeometry.cpp.

◆ operator++() [2/2]

QgsAbstractGeometry::part_iterator QgsAbstractGeometry::part_iterator::operator++ ( int  )

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

Definition at line 533 of file qgsabstractgeometry.cpp.

◆ operator==()

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

Definition at line 556 of file qgsabstractgeometry.cpp.

◆ partNumber()

int QgsAbstractGeometry::part_iterator::partNumber ( ) const

Returns the part number of the current item.

Definition at line 551 of file qgsabstractgeometry.cpp.


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