QGIS API Documentation  2.12.0-Lyon
Public Member Functions | Protected Member Functions | List of all members
QgsCachedFeatureIterator Class Reference

Delivers features from the cache. More...

#include <qgscachedfeatureiterator.h>

Inheritance diagram for QgsCachedFeatureIterator:
Inheritance graph
[legend]

Public Member Functions

 QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest, const QgsFeatureIds &featureIds)
 This constructor creates a feature iterator, that delivers only cached information, based on the QgsFeatureIds. More...
 
 QgsCachedFeatureIterator (QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest)
 This constructor creates a feature iterator, that delivers all cached features. More...
 
virtual bool close () override
 Close this iterator. More...
 
virtual 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 ()
 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) override
 Implementation for fetching a feature. More...
 
virtual 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...
 
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

- Protected Attributes inherited from QgsAbstractFeatureIterator
bool mClosed
 Set to true, as soon as the iterator is closed. More...
 
QgsFeatureRequest mRequest
 A copy of the feature request. More...
 
int refs
 reference counting (to allow seamless copying of QgsFeatureIterator instances) More...
 

Detailed Description

Delivers features from the cache.

Definition at line 29 of file qgscachedfeatureiterator.h.

Constructor & Destructor Documentation

QgsCachedFeatureIterator::QgsCachedFeatureIterator ( QgsVectorLayerCache vlCache,
const QgsFeatureRequest featureRequest,
const QgsFeatureIds featureIds 
)

This constructor creates a feature iterator, that delivers only cached information, based on the QgsFeatureIds.

No request is made to the backend.

Parameters
vlCacheThe vector layer cache to use
featureRequestThe feature request to answer
featureIdsThe feature ids to return
Deprecated:
Use QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest ) instead

Definition at line 19 of file qgscachedfeatureiterator.cpp.

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.

Parameters
vlCacheThe vector layer cache to use
featureRequestThe feature request to answer

Definition at line 30 of file qgscachedfeatureiterator.cpp.

Member Function Documentation

bool QgsCachedFeatureIterator::close ( )
overridevirtual

Close this iterator.

No further features will be available.

Returns
true if successful

Implements QgsAbstractFeatureIterator.

Definition at line 77 of file qgscachedfeatureiterator.cpp.

bool QgsCachedFeatureIterator::fetchFeature ( QgsFeature f)
overrideprotectedvirtual

Implementation for fetching a feature.

Parameters
fWill write to this feature
Returns
bool true if the operation was ok
See also
bool getFeature( QgsFeature& f )

Implements QgsAbstractFeatureIterator.

Definition at line 55 of file qgscachedfeatureiterator.cpp.

virtual bool QgsCachedFeatureIterator::nextFeatureFilterFids ( QgsFeature f)
inlineoverrideprotectedvirtual

We have a local special iterator for FilterFids, no need to run the generic.

Parameters
fWill write to this feature
Returns
bool true if the operation was ok

Reimplemented from QgsAbstractFeatureIterator.

Definition at line 85 of file qgscachedfeatureiterator.h.

bool QgsCachedFeatureIterator::rewind ( )
overridevirtual

Rewind to the beginning of the iterator.

Returns
bool true if the operation was ok

Implements QgsAbstractFeatureIterator.

Definition at line 71 of file qgscachedfeatureiterator.cpp.


The documentation for this class was generated from the following files: