| QGIS API Documentation
    3.20.0-Odense (decaadbb31)
    | 
Delivers features from the cache. More...
#include <qgscachedfeatureiterator.h>

| Public Member Functions | |
| QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest) | |
| This constructor creates a feature iterator, that delivers all cached features.  More... | |
| bool | close () override | 
| Close this iterator.  More... | |
| bool | rewind () override | 
| Rewind to the beginning of the iterator.  More... | |
|  Public Member Functions inherited from QgsAbstractFeatureIterator | |
| QgsAbstractFeatureIterator (const QgsFeatureRequest &request) | |
| base class constructor - stores the iteration parameters  More... | |
| virtual | ~QgsAbstractFeatureIterator ()=default | 
| destructor makes sure that the iterator is closed properly  More... | |
| bool | compileFailed () const | 
| Indicator if there was an error when sending the compiled query to the server.  More... | |
| CompileStatus | compileStatus () const | 
| Returns the status of expression compilation for filter expression requests.  More... | |
| virtual bool | isValid () const | 
| Returns if this iterator is valid.  More... | |
| virtual bool | nextFeature (QgsFeature &f) | 
| fetch next feature, return trueon success  More... | |
| virtual void | setInterruptionChecker (QgsFeedback *interruptionChecker) | 
| Attach an object that can be queried regularly by the iterator to check if it must stopped.  More... | |
| Protected Member Functions | |
| bool | fetchFeature (QgsFeature &f) override | 
| Implementation for fetching a feature.  More... | |
| bool | nextFeatureFilterFids (QgsFeature &f) override | 
| We have a local special iterator for FilterFids, no need to run the generic.  More... | |
|  Protected Member Functions inherited from QgsAbstractFeatureIterator | |
| void | deref () | 
| Remove reference, delete if refs == 0.  More... | |
| QgsRectangle | filterRectToSourceCrs (const QgsCoordinateTransform &transform) const SIP_THROW(QgsCsException) | 
| Returns a rectangle representing the original request's QgsFeatureRequest::filterRect().  More... | |
| void | geometryToDestinationCrs (QgsFeature &feature, const QgsCoordinateTransform &transform) const | 
| Transforms feature's geometry according to the specified coordinate transform.  More... | |
| virtual bool | nextFeatureFilterExpression (QgsFeature &f) | 
| By default, the iterator will fetch all features and check if the feature matches the expression.  More... | |
| virtual bool | prepareSimplification (const QgsSimplifyMethod &simplifyMethod) | 
| Setup the simplification of geometries to fetch using the specified simplify method.  More... | |
| void | ref () | 
| Add reference.  More... | |
| Additional Inherited Members | |
|  Public Types inherited from QgsAbstractFeatureIterator | |
| enum | CompileStatus { NoCompilation , PartiallyCompiled , Compiled } | 
| Status of expression compilation for filter expression requests.  More... | |
|  Protected Attributes inherited from QgsAbstractFeatureIterator | |
| bool | mClosed = false | 
| Sets to true, as soon as the iterator is closed.  More... | |
| bool | mCompileFailed = false | 
| CompileStatus | mCompileStatus = NoCompilation | 
| Status of compilation of filter expression.  More... | |
| long long | mFetchedCount = 0 | 
| Number of features already fetched by iterator.  More... | |
| QgsFeatureRequest | mRequest | 
| A copy of the feature request.  More... | |
| bool | mValid = true | 
| An invalid state of a feature iterator indicates that there was a problem with even getting it up and running.  More... | |
| bool | mZombie = false | 
| A feature iterator may be closed already but still be serving features from the cache.  More... | |
| int | refs = 0 | 
| reference counting (to allow seamless copying of QgsFeatureIterator instances)  More... | |
Delivers features from the cache.
Definition at line 31 of file qgscachedfeatureiterator.h.
| QgsCachedFeatureIterator::QgsCachedFeatureIterator | ( | QgsVectorLayerCache * | vlCache, | 
| const QgsFeatureRequest & | featureRequest | ||
| ) | 
This constructor creates a feature iterator, that delivers all cached features.
No request is made to the backend.
| vlCache | The vector layer cache to use | 
| featureRequest | The feature request to answer | 
Definition at line 21 of file qgscachedfeatureiterator.cpp.
| 
 | overridevirtual | 
Close this iterator.
No further features will be available.
true if successful Implements QgsAbstractFeatureIterator.
Definition at line 107 of file qgscachedfeatureiterator.cpp.
| 
 | overrideprotectedvirtual | 
Implementation for fetching a feature.
| f | Will write to this feature | 
true if the operation was OKImplements QgsAbstractFeatureIterator.
Definition at line 73 of file qgscachedfeatureiterator.cpp.
| 
 | inlineoverrideprotectedvirtual | 
We have a local special iterator for FilterFids, no need to run the generic.
| f | Will write to this feature | 
true if the operation was OK Reimplemented from QgsAbstractFeatureIterator.
Definition at line 76 of file qgscachedfeatureiterator.h.
| 
 | overridevirtual | 
Rewind to the beginning of the iterator.
true if the operation was OK Implements QgsAbstractFeatureIterator.
Definition at line 101 of file qgscachedfeatureiterator.cpp.