QgsAbstractGeometry::const_part_iterator class

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

Constructors, destructors, conversion operators

const_part_iterator() defaulted
Create invalid iterator.
const_part_iterator(const QgsAbstractGeometry* g, int index)
Create part iterator for a geometry.

Public functions

auto operator*() const -> const QgsAbstractGeometry*
Returns the current item.
auto operator++() -> const_part_iterator&
The prefix ++ operator (++it) advances the iterator to the next part and returns an iterator to the new current part.
auto operator++(int) -> const_part_iterator
The postfix ++ operator (it++) advances the iterator to the next part and returns an iterator to the previously current part.
auto partNumber() const -> int
Returns the part number of the current item.

Function documentation

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.