QGIS API Documentation  2.17.0-Master (f49f7ce)
Public Member Functions | Protected Member Functions | List of all members
QgsCachedFeatureWriterIterator Class Reference

Uses another iterator as backend and writes features to the cache. More...

#include <qgscachedfeatureiterator.h>

Inheritance diagram for QgsCachedFeatureWriterIterator:
Inheritance graph
[legend]

Public Member Functions

 QgsCachedFeatureWriterIterator (QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest)
 This constructor creates a feature iterator, which queries the backend and caches retrieved 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...
 
CompileStatus compileStatus () const
 Returns the status of expression compilation for filter expression requests. More...
 
virtual bool nextFeature (QgsFeature &f)
 fetch next feature, return true on success More...
 
virtual void setInterruptionChecker (QgsInterruptionChecker *interruptionChecker)
 Attach an object that can be queried regularly by the iterator to check if it must stopped. More...
 

Protected Member Functions

virtual bool fetchFeature (QgsFeature &f) override
 Implementation for fetching a feature. 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 nextFeatureFilterFids (QgsFeature &f)
 By default, the iterator will fetch all features and check if the id is in the request. 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

- Public Types inherited from QgsAbstractFeatureIterator
enum  CompileStatus { NoCompilation, PartiallyCompiled, Compiled }
 Status of expression compilation for filter expression requests. More...
 
- Protected Attributes inherited from QgsAbstractFeatureIterator
bool mClosed
 Set to true, as soon as the iterator is closed. More...
 
CompileStatus mCompileStatus
 Status of compilation of filter expression. More...
 
long mFetchedCount
 Number of features already fetched by iterator. More...
 
QgsFeatureRequest mRequest
 A copy of the feature request. More...
 
bool mZombie
 A feature iterator may be closed already but still be serving features from the cache. More...
 
int refs
 reference counting (to allow seamless copying of QgsFeatureIterator instances) TODO QGIS3: make this private More...
 

Detailed Description

Uses another iterator as backend and writes features to the cache.

Definition at line 98 of file qgscachedfeatureiterator.h.

Constructor & Destructor Documentation

QgsCachedFeatureWriterIterator::QgsCachedFeatureWriterIterator ( QgsVectorLayerCache vlCache,
const QgsFeatureRequest featureRequest 
)

This constructor creates a feature iterator, which queries the backend and caches retrieved features.

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

Definition at line 84 of file qgscachedfeatureiterator.cpp.

Member Function Documentation

bool QgsCachedFeatureWriterIterator::close ( )
overridevirtual

Close this iterator.

No further features will be available.

Returns
true if successful

Implements QgsAbstractFeatureIterator.

Definition at line 115 of file qgscachedfeatureiterator.cpp.

bool QgsCachedFeatureWriterIterator::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 91 of file qgscachedfeatureiterator.cpp.

bool QgsCachedFeatureWriterIterator::rewind ( )
overridevirtual

Rewind to the beginning of the iterator.

Returns
bool true if the operation was ok

Implements QgsAbstractFeatureIterator.

Definition at line 109 of file qgscachedfeatureiterator.cpp.


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