QgsCachedFeatureWriterIterator class

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

Base classes

class QgsAbstractFeatureIterator
Internal feature iterator to be implemented within data providers.

Constructors, destructors, conversion operators

QgsCachedFeatureWriterIterator(QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest)
This constructor creates a feature iterator, which queries the backend and caches retrieved features.

Public functions

auto close() -> bool override
Close this iterator.
auto rewind() -> bool override
Rewind to the beginning of the iterator.

Protected functions

auto fetchFeature(QgsFeature& f) -> bool override
Implementation for fetching a feature.

Function documentation

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

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

Parameters
vlCache The vector layer cache to use
featureRequest The feature request to answer

bool QgsCachedFeatureWriterIterator::close() override

Close this iterator.

Returns true if successful

No further features will be available.

bool QgsCachedFeatureWriterIterator::rewind() override

Rewind to the beginning of the iterator.

Returns bool true if the operation was OK

bool QgsCachedFeatureWriterIterator::fetchFeature(QgsFeature& f) override protected

Implementation for fetching a feature.

Parameters
f Will write to this feature
Returns bool true if the operation was OK