QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Protected Attributes | Friends | List of all members
QgsFeatureIterator Class Reference

Wrapper for iterator of features from vector data provider or vector layer. More...

#include <qgsfeatureiterator.h>

Public Member Functions

 QgsFeatureIterator ()
 construct invalid iterator More...
 
 QgsFeatureIterator (QgsAbstractFeatureIterator *iter)
 construct a valid iterator More...
 
 QgsFeatureIterator (const QgsFeatureIterator &fi)
 copy constructor copies the iterator, increases ref.count More...
 
 ~QgsFeatureIterator ()
 destructor deletes the iterator if it has no more references More...
 
bool close ()
 
QgsAbstractFeatureIterator::CompileStatus compileStatus () const
 Returns the status of expression compilation for filter expression requests. More...
 
bool isClosed () const
 find out whether the iterator is still valid or closed already More...
 
bool nextFeature (QgsFeature &f)
 
QgsFeatureIteratoroperator= (const QgsFeatureIterator &other)
 
bool rewind ()
 
void setInterruptionChecker (QgsInterruptionChecker *interruptionChecker)
 Attach an object that can be queried regularly by the iterator to check if it must stopped. More...
 

Protected Attributes

QgsAbstractFeatureIteratormIter
 

Friends

bool operator!= (const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
 
bool operator== (const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
 

Detailed Description

Wrapper for iterator of features from vector data provider or vector layer.

Definition at line 209 of file qgsfeatureiterator.h.

Constructor & Destructor Documentation

◆ QgsFeatureIterator() [1/3]

QgsFeatureIterator::QgsFeatureIterator ( )
inline

construct invalid iterator

Definition at line 253 of file qgsfeatureiterator.h.

◆ QgsFeatureIterator() [2/3]

QgsFeatureIterator::QgsFeatureIterator ( QgsAbstractFeatureIterator iter)
inline

construct a valid iterator

Definition at line 258 of file qgsfeatureiterator.h.

◆ QgsFeatureIterator() [3/3]

QgsFeatureIterator::QgsFeatureIterator ( const QgsFeatureIterator fi)
inline

copy constructor copies the iterator, increases ref.count

Definition at line 265 of file qgsfeatureiterator.h.

◆ ~QgsFeatureIterator()

QgsFeatureIterator::~QgsFeatureIterator ( )
inline

destructor deletes the iterator if it has no more references

Definition at line 272 of file qgsfeatureiterator.h.

Member Function Documentation

◆ close()

bool QgsFeatureIterator::close ( )
inline

Definition at line 291 of file qgsfeatureiterator.h.

◆ compileStatus()

QgsAbstractFeatureIterator::CompileStatus QgsFeatureIterator::compileStatus ( ) const
inline

Returns the status of expression compilation for filter expression requests.

Note
added in QGIS 2.16

Definition at line 242 of file qgsfeatureiterator.h.

◆ isClosed()

bool QgsFeatureIterator::isClosed ( ) const
inline

find out whether the iterator is still valid or closed already

Definition at line 299 of file qgsfeatureiterator.h.

◆ nextFeature()

bool QgsFeatureIterator::nextFeature ( QgsFeature f)
inline

Definition at line 278 of file qgsfeatureiterator.h.

◆ operator=()

QgsFeatureIterator & QgsFeatureIterator::operator= ( const QgsFeatureIterator other)

Definition at line 199 of file qgsfeatureiterator.cpp.

◆ rewind()

bool QgsFeatureIterator::rewind ( )
inline

Definition at line 283 of file qgsfeatureiterator.h.

◆ setInterruptionChecker()

void QgsFeatureIterator::setInterruptionChecker ( QgsInterruptionChecker interruptionChecker)
inline

Attach an object that can be queried regularly by the iterator to check if it must stopped.

This is mostly useful for iterators where a single nextFeature()/fetchFeature() iteration might be very long. A typical use case is the WFS provider.

Note
added in QGIS 2.16
not available in Python bindings

Definition at line 314 of file qgsfeatureiterator.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const QgsFeatureIterator fi1,
const QgsFeatureIterator fi2 
)
friend

Definition at line 309 of file qgsfeatureiterator.h.

◆ operator==

bool operator== ( const QgsFeatureIterator fi1,
const QgsFeatureIterator fi2 
)
friend

Definition at line 304 of file qgsfeatureiterator.h.

Member Data Documentation

◆ mIter

QgsAbstractFeatureIterator* QgsFeatureIterator::mIter
protected

Definition at line 248 of file qgsfeatureiterator.h.


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