|
QGIS API Documentation
2.4.0-Chugiak
|
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. More... | |
| QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest) | |
| This constructor creates a feature iterator, that delivers all cached features. More... | |
| virtual bool | rewind () |
| Rewind to the beginning of the iterator. More... | |
| virtual bool | close () |
| Close this iterator. More... | |
Public Member Functions inherited from QgsAbstractFeatureIterator | |
| QgsAbstractFeatureIterator (const QgsFeatureRequest &request) | |
| base class constructor - stores the iteration parameters More... | |
| virtual | ~QgsAbstractFeatureIterator () |
| destructor makes sure that the iterator is closed properly More... | |
| virtual bool | nextFeature (QgsFeature &f) |
| fetch next feature, return true on success More... | |
Protected Member Functions | |
| virtual bool | fetchFeature (QgsFeature &f) |
| Implementation for fetching a feature. More... | |
| virtual bool | nextFeatureFilterFids (QgsFeature &f) |
| We have a local special iterator for FilterFids, no need to run the generic. More... | |
Protected Member Functions inherited from QgsAbstractFeatureIterator | |
| virtual bool | nextFeatureFilterExpression (QgsFeature &f) |
| By default, the iterator will fetch all features and check if the feature matches the expression. More... | |
| void | ref () |
| add reference More... | |
| void | deref () |
| remove reference, delete if refs == 0 More... | |
| virtual bool | prepareSimplification (const QgsSimplifyMethod &simplifyMethod) |
| Setup the simplification of geometries to fetch using the specified simplify method. More... | |
Private Attributes | |
| QgsFeatureIds | mFeatureIds |
| QgsVectorLayerCache * | mVectorLayerCache |
| QgsFeatureIds::ConstIterator | mFeatureIdIterator |
Additional Inherited Members | |
Protected Attributes inherited from QgsAbstractFeatureIterator | |
| QgsFeatureRequest | mRequest |
| A copy of the feature request. More... | |
| bool | mClosed |
| Set to true, as soon as the iterator is closed. More... | |
| int | refs |
| reference counting (to allow seamless copying of QgsFeatureIterator instances) More... | |
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.
References close(), and mFeatureIdIterator.
| 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.
References close(), QgsFeatureRequest::FilterFid, QgsFeatureRequest::filterFid(), QgsFeatureRequest::FilterFids, QgsFeatureRequest::filterFids(), QgsFeatureRequest::filterType(), QgsVectorLayerCache::mCache, mFeatureIdIterator, mFeatureIds, and mVectorLayerCache.
|
virtual |
Close this iterator.
No further features will be available.
Implements QgsAbstractFeatureIterator.
Definition at line 77 of file qgscachedfeatureiterator.cpp.
References QgsAbstractFeatureIterator::mClosed, and mFeatureIds.
Referenced by fetchFeature(), and QgsCachedFeatureIterator().
|
protectedvirtual |
Implementation for fetching a feature.
| f | Will write to this feature |
Implements QgsAbstractFeatureIterator.
Definition at line 55 of file qgscachedfeatureiterator.cpp.
References QgsFeatureRequest::acceptFeature(), close(), QgsVectorLayerCache::mCache, QgsAbstractFeatureIterator::mClosed, mFeatureIdIterator, mFeatureIds, QgsAbstractFeatureIterator::mRequest, and mVectorLayerCache.
|
inlineprotectedvirtual |
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.
References QgsAbstractFeatureIterator::fetchFeature().
|
virtual |
Rewind to the beginning of the iterator.
Implements QgsAbstractFeatureIterator.
Definition at line 71 of file qgscachedfeatureiterator.cpp.
References mFeatureIdIterator, and mFeatureIds.
|
private |
Definition at line 90 of file qgscachedfeatureiterator.h.
Referenced by fetchFeature(), QgsCachedFeatureIterator(), and rewind().
|
private |
Definition at line 88 of file qgscachedfeatureiterator.h.
Referenced by close(), fetchFeature(), QgsCachedFeatureIterator(), and rewind().
|
private |
Definition at line 89 of file qgscachedfeatureiterator.h.
Referenced by fetchFeature(), and QgsCachedFeatureIterator().
1.8.7