QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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, 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 rewind ()
 Rewind to the beginning of the iterator.
virtual bool close ()
 Close this 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)
 Implementation for fetching a feature.
virtual bool nextFeatureFilterFids (QgsFeature &f)
 We have a local special iterator for FilterFids, no need to run the generic.
- 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.
void ref ()
 add reference
void deref ()
 remove reference, delete if refs == 0
virtual bool prepareSimplification (const QgsSimplifyMethod &simplifyMethod)
 Setup the simplification of geometries to fetch using the specified simplify method.

Additional Inherited Members

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

Detailed Description

Delivers features from the cache.

Constructor & Destructor Documentation

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.

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
QgsCachedFeatureIterator::QgsCachedFeatureIterator ( QgsVectorLayerCache vlCache,
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

Member Function Documentation

bool QgsCachedFeatureIterator::close ( )
virtual

Close this iterator.

No further features will be available.

Returns
true if successful

Implements QgsAbstractFeatureIterator.

bool QgsCachedFeatureIterator::fetchFeature ( QgsFeature f)
protectedvirtual

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.

virtual bool QgsCachedFeatureIterator::nextFeatureFilterFids ( QgsFeature f)
inlineprotectedvirtual

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.

bool QgsCachedFeatureIterator::rewind ( )
virtual

Rewind to the beginning of the iterator.

Returns
bool true if the operation was ok

Implements QgsAbstractFeatureIterator.


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