QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsCachedFeatureIterator Class Reference

Delivers features from the cache. More...

#include <qgscachedfeatureiterator.h>

Inheritance diagram for QgsCachedFeatureIterator:
Inheritance graph
[legend]
Collaboration diagram for QgsCachedFeatureIterator:
Collaboration 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.
virtual bool nextFeature (QgsFeature &f)
virtual bool rewind ()
virtual bool close ()
- 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

Private Attributes

QgsFeatureIds mFeatureIds
QgsVectorLayerCachemVectorLayerCache
QgsFeatureIds::Iterator mFeatureIdIterator

Additional Inherited Members

- Protected Member Functions inherited from QgsAbstractFeatureIterator
void ref ()
void deref ()
- Protected Attributes inherited from QgsAbstractFeatureIterator
QgsFeatureRequest mRequest
bool mClosed
int refs

Detailed Description

Delivers features from the cache.

Definition at line 29 of file qgscachedfeatureiterator.h.

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

Definition at line 19 of file qgscachedfeatureiterator.cpp.

References mFeatureIdIterator.

Member Function Documentation

bool QgsCachedFeatureIterator::close ( )
virtual
Returns
bool

Implements QgsAbstractFeatureIterator.

Definition at line 48 of file qgscachedfeatureiterator.cpp.

bool QgsCachedFeatureIterator::nextFeature ( QgsFeature f)
virtual
Parameters
f
Returns
bool

Implements QgsAbstractFeatureIterator.

Definition at line 27 of file qgscachedfeatureiterator.cpp.

References QgsVectorLayerCache::mCache, mFeatureIdIterator, mFeatureIds, and mVectorLayerCache.

bool QgsCachedFeatureIterator::rewind ( )
virtual
Returns
bool

Implements QgsAbstractFeatureIterator.

Definition at line 42 of file qgscachedfeatureiterator.cpp.

References mFeatureIdIterator, and mFeatureIds.

Member Data Documentation

QgsFeatureIds::Iterator QgsCachedFeatureIterator::mFeatureIdIterator
private

Definition at line 68 of file qgscachedfeatureiterator.h.

Referenced by nextFeature(), QgsCachedFeatureIterator(), and rewind().

QgsFeatureIds QgsCachedFeatureIterator::mFeatureIds
private

Definition at line 66 of file qgscachedfeatureiterator.h.

Referenced by nextFeature(), and rewind().

QgsVectorLayerCache* QgsCachedFeatureIterator::mVectorLayerCache
private

Definition at line 67 of file qgscachedfeatureiterator.h.

Referenced by nextFeature().


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