QGIS API Documentation
2.8.2-Wien
|
Delivers features from the cache. More...
#include <qgscachedfeatureiterator.h>
Public Member Functions | |
QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest, QgsFeatureIds featureIds) | |
This constructor creates a feature iterator, that delivers only cached information, based on the QgsFeatureIds. | |
QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest) | |
This constructor creates a feature iterator, that delivers all cached features. | |
virtual bool | close () override |
Close this iterator. | |
virtual bool | rewind () override |
Rewind to the beginning of the iterator. | |
Public Member Functions inherited from QgsAbstractFeatureIterator | |
QgsAbstractFeatureIterator (const QgsFeatureRequest &request) | |
base class constructor - stores the iteration parameters | |
virtual | ~QgsAbstractFeatureIterator () |
destructor makes sure that the iterator is closed properly | |
virtual bool | nextFeature (QgsFeature &f) |
fetch next feature, return true on success |
Protected Member Functions | |
virtual bool | fetchFeature (QgsFeature &f) override |
Implementation for fetching a feature. | |
virtual bool | nextFeatureFilterFids (QgsFeature &f) override |
We have a local special iterator for FilterFids, no need to run the generic. | |
Protected Member Functions inherited from QgsAbstractFeatureIterator | |
void | deref () |
remove reference, delete if refs == 0 | |
virtual bool | nextFeatureFilterExpression (QgsFeature &f) |
By default, the iterator will fetch all features and check if the feature matches the expression. | |
virtual bool | prepareSimplification (const QgsSimplifyMethod &simplifyMethod) |
Setup the simplification of geometries to fetch using the specified simplify method. | |
void | ref () |
add reference |
Additional Inherited Members | |
Protected Attributes inherited from QgsAbstractFeatureIterator | |
bool | mClosed |
Set to true, as soon as the iterator is closed. | |
QgsFeatureRequest | mRequest |
A copy of the feature request. | |
int | refs |
reference counting (to allow seamless copying of QgsFeatureIterator instances) |
Delivers features from the cache.
Definition at line 29 of file qgscachedfeatureiterator.h.
QgsCachedFeatureIterator::QgsCachedFeatureIterator | ( | QgsVectorLayerCache * | vlCache, |
QgsFeatureRequest | featureRequest, | ||
QgsFeatureIds | featureIds | ||
) |
This constructor creates a feature iterator, that delivers only cached information, based on the QgsFeatureIds.
No request is made to the backend.
vlCache | The vector layer cache to use |
featureRequest | The feature request to answer |
featureIds | The feature ids to return |
Definition at line 19 of file qgscachedfeatureiterator.cpp.
QgsCachedFeatureIterator::QgsCachedFeatureIterator | ( | QgsVectorLayerCache * | vlCache, |
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 30 of file qgscachedfeatureiterator.cpp.
|
overridevirtual |
Close this iterator.
No further features will be available.
Implements QgsAbstractFeatureIterator.
Definition at line 77 of file qgscachedfeatureiterator.cpp.
|
overrideprotectedvirtual |
Implementation for fetching a feature.
f | Will write to this feature |
Implements QgsAbstractFeatureIterator.
Definition at line 55 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 |
Reimplemented from QgsAbstractFeatureIterator.
Definition at line 85 of file qgscachedfeatureiterator.h.
|
overridevirtual |
Rewind to the beginning of the iterator.
Implements QgsAbstractFeatureIterator.
Definition at line 71 of file qgscachedfeatureiterator.cpp.