15 #ifndef QGSFEATUREITERATOR_H
16 #define QGSFEATUREITERATOR_H
39 virtual bool rewind() = 0;
41 virtual bool close() = 0;
51 virtual bool fetchFeature(
QgsFeature& f ) = 0;
63 virtual bool nextFeatureFilterExpression(
QgsFeature &f );
76 virtual bool nextFeatureFilterFids(
QgsFeature & f );
97 bool mLocalSimplification;
116 mSource->iteratorOpened(
this );
158 bool isClosed()
const;
221 return !( fi1 == fi2 );
224 #endif // QGSFEATUREITERATOR_H
Wrapper for iterator of features from vector data provider or vector layer.
virtual bool close()=0
end of iterating: free the resources / lock
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
virtual bool rewind()=0
reset the iterator to the starting position
~QgsAbstractFeatureIteratorFromSource()
bool mClosed
Set to true, as soon as the iterator is closed.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool isClosed() const
find out whether the iterator is still valid or closed already
void iteratorClosed()
to be called by from subclass in close()
virtual bool nextFeature(QgsFeature &f)
fetch next feature, return true on success
Internal feature iterator to be implemented within data providers.
QgsFeatureIterator()
construct invalid iterator
This class wraps a request for features to a vector layer (or directly its vector data provider)...
void deref()
remove reference, delete if refs == 0
QgsFeatureRequest mRequest
A copy of the feature request.
QgsAbstractFeatureIterator * mIter
~QgsFeatureIterator()
destructor deletes the iterator if it has no more references
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
int refs
reference counting (to allow seamless copying of QgsFeatureIterator instances)
bool nextFeature(QgsFeature &f)
Abstract base class for simplify geometries using a specific algorithm.
QgsAbstractFeatureIteratorFromSource(T *source, bool ownSource, const QgsFeatureRequest &request)
helper template that cares of two things: 1.