QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsAbstractGeometry::const_part_iterator Class Reference

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

#include <qgsabstractgeometry.h>

Public Member Functions

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

Detailed Description

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

Since
QGIS 3.6

Definition at line 883 of file qgsabstractgeometry.h.

Constructor & Destructor Documentation

◆ const_part_iterator() [1/2]

QgsAbstractGeometry::const_part_iterator::const_part_iterator ( )
default

Create invalid iterator.

◆ const_part_iterator() [2/2]

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

Create part iterator for a geometry.

Definition at line 604 of file qgsabstractgeometry.cpp.

Member Function Documentation

◆ operator!=()

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

Definition at line 913 of file qgsabstractgeometry.h.

◆ operator*()

const QgsAbstractGeometry * QgsAbstractGeometry::const_part_iterator::operator* ( ) const

Returns the current item.

Definition at line 633 of file qgsabstractgeometry.cpp.

◆ operator++() [1/2]

QgsAbstractGeometry::const_part_iterator & QgsAbstractGeometry::const_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 610 of file qgsabstractgeometry.cpp.

◆ operator++() [2/2]

QgsAbstractGeometry::const_part_iterator QgsAbstractGeometry::const_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 626 of file qgsabstractgeometry.cpp.

◆ operator==()

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

Definition at line 649 of file qgsabstractgeometry.cpp.

◆ partNumber()

int QgsAbstractGeometry::const_part_iterator::partNumber ( ) const

Returns the part number of the current item.

Definition at line 644 of file qgsabstractgeometry.cpp.


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