|
QGIS API Documentation
2.4.0-Chugiak
|
Uses another iterator as backend and writes features to the cache. More...
#include <qgscachedfeatureiterator.h>


Public Member Functions | |
| QgsCachedFeatureWriterIterator (QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest) | |
| This constructor creates a feature iterator, which queries the backend and caches retrieved 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... | |
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... | |
| virtual bool | nextFeatureFilterFids (QgsFeature &f) |
| By default, the iterator will fetch all features and check if the id is in the request. 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 | |
| QgsFeatureIterator | mFeatIt |
| QgsVectorLayerCache * | mVectorLayerCache |
| QgsFeatureIds | mFids |
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... | |
Uses another iterator as backend and writes features to the cache.
Definition at line 98 of file qgscachedfeatureiterator.h.
| QgsCachedFeatureWriterIterator::QgsCachedFeatureWriterIterator | ( | QgsVectorLayerCache * | vlCache, |
| QgsFeatureRequest | featureRequest | ||
| ) |
This constructor creates a feature iterator, which queries the backend and caches retrieved features.
| vlCache | The vector layer cache to use |
| featureRequest | The feature request to answer |
Definition at line 84 of file qgscachedfeatureiterator.cpp.
References QgsVectorLayer::getFeatures(), QgsVectorLayerCache::layer(), and mFeatIt.
|
virtual |
Close this iterator.
No further features will be available.
Implements QgsAbstractFeatureIterator.
Definition at line 115 of file qgscachedfeatureiterator.cpp.
References QgsFeatureIterator::close(), QgsAbstractFeatureIterator::mClosed, and mFeatIt.
|
protectedvirtual |
Implementation for fetching a feature.
| f | Will write to this feature |
Implements QgsAbstractFeatureIterator.
Definition at line 91 of file qgscachedfeatureiterator.cpp.
References QgsVectorLayerCache::cacheFeature(), QgsFeature::id(), mFeatIt, mFids, QgsAbstractFeatureIterator::mRequest, mVectorLayerCache, QgsFeatureIterator::nextFeature(), and QgsVectorLayerCache::requestCompleted().
|
virtual |
Rewind to the beginning of the iterator.
Implements QgsAbstractFeatureIterator.
Definition at line 109 of file qgscachedfeatureiterator.cpp.
References mFeatIt, mFids, and QgsFeatureIterator::rewind().
|
private |
Definition at line 136 of file qgscachedfeatureiterator.h.
Referenced by close(), fetchFeature(), QgsCachedFeatureWriterIterator(), and rewind().
|
private |
Definition at line 138 of file qgscachedfeatureiterator.h.
Referenced by fetchFeature(), and rewind().
|
private |
Definition at line 137 of file qgscachedfeatureiterator.h.
Referenced by fetchFeature().
1.8.7