|
QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
|
Wrapper for iterator of features from vector data provider or vector layer. More...
#include <qgsfeatureiterator.h>
Public Member Functions | |
| QgsFeatureIterator ()=default | |
| Construct invalid iterator. | |
| QgsFeatureIterator (const QgsFeatureIterator &fi) | |
| Copy constructor copies the iterator, increases ref.count. | |
| QgsFeatureIterator (QgsAbstractFeatureIterator *iter) | |
| Construct a valid iterator. | |
| ~QgsFeatureIterator () | |
| Destructor deletes the iterator if it has no more references. | |
| bool | close () |
| Call to end the iteration. | |
| bool | compileFailed () const |
| Indicator if there was an error when sending the compiled query to the server. | |
| QgsAbstractFeatureIterator::CompileStatus | compileStatus () const |
| Returns the status of expression compilation for filter expression requests. | |
| bool | isClosed () const |
| find out whether the iterator is still valid or closed already | |
| bool | isValid () const |
| Will return if this iterator is valid. | |
| bool | nextFeature (QgsFeature &f) |
Fetch next feature and stores in f, returns true on success. | |
| QgsFeatureIterator & | operator= (const QgsFeatureIterator &other) |
| bool | rewind () |
| Resets the iterator to the starting position. | |
| void | setInterruptionChecker (QgsFeedback *interruptionChecker) |
| Attach an object that can be queried regularly by the iterator to check if it must stopped. | |
Protected Attributes | |
| QgsAbstractFeatureIterator * | mIter = nullptr |
Friends | |
| bool | operator!= (const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2) |
| bool | operator== (const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2) |
Wrapper for iterator of features from vector data provider or vector layer.
Definition at line 283 of file qgsfeatureiterator.h.
|
default |
Construct invalid iterator.
|
inline |
Construct a valid iterator.
Definition at line 381 of file qgsfeatureiterator.h.
|
inline |
Copy constructor copies the iterator, increases ref.count.
Definition at line 388 of file qgsfeatureiterator.h.
|
inline |
Destructor deletes the iterator if it has no more references.
Definition at line 395 of file qgsfeatureiterator.h.
|
inline |
Call to end the iteration.
This frees any resources used by the iterator.
Definition at line 414 of file qgsfeatureiterator.h.
|
inline |
Indicator if there was an error when sending the compiled query to the server.
This indicates that there is something wrong with the expression compiler.
Definition at line 370 of file qgsfeatureiterator.h.
|
inline |
Returns the status of expression compilation for filter expression requests.
Definition at line 362 of file qgsfeatureiterator.h.
|
inline |
find out whether the iterator is still valid or closed already
Definition at line 422 of file qgsfeatureiterator.h.
| bool QgsFeatureIterator::isValid | ( | ) | const |
Will return if this iterator is valid.
An invalid iterator was probably introduced by a failed attempt to acquire a connection or is a default constructed iterator.
Definition at line 276 of file qgsfeatureiterator.cpp.
|
inline |
Fetch next feature and stores in f, returns true on success.
Definition at line 401 of file qgsfeatureiterator.h.
| QgsFeatureIterator & QgsFeatureIterator::operator= | ( | const QgsFeatureIterator & | other | ) |
Definition at line 263 of file qgsfeatureiterator.cpp.
|
inline |
Resets the iterator to the starting position.
Definition at line 406 of file qgsfeatureiterator.h.
|
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.
Definition at line 437 of file qgsfeatureiterator.h.
|
friend |
Definition at line 432 of file qgsfeatureiterator.h.
|
friend |
Definition at line 427 of file qgsfeatureiterator.h.
|
protected |
Definition at line 376 of file qgsfeatureiterator.h.