QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
15 #ifndef QGSVECTORLAYERFEATUREITERATOR_H
16 #define QGSVECTORLAYERFEATUREITERATOR_H
18 #include "qgis_core.h"
131 bool close()
override;
148 void addJoinedAttributesCached(
QgsFeature &f,
const QVariant &joinValue )
const;
149 void addJoinedAttributesDirect(
QgsFeature &f,
const QVariant &joinValue )
const;
153 bool isValid()
const override;
157 bool fetchFeature(
QgsFeature &feature )
override;
172 void prepareJoin(
int fieldIdx )
SIP_SKIP;
175 void prepareExpression(
int fieldIdx )
SIP_SKIP;
181 void prepareField(
int fieldIdx )
SIP_SKIP;
253 bool mHasVirtualAttributes;
260 void createExpressionContext();
261 std::unique_ptr<QgsExpressionContext> mExpressionContext;
265 QList< int > mPreparedFields;
266 QList< int > mFieldsToPrepare;
269 QList< FetchJoinInfo > mOrderedJoinInfoList;
275 bool prepareOrderBy(
const QList<QgsFeatureRequest::OrderByClause> &orderBys )
override;
280 void createOrderedJoinList();
285 bool postProcessFeature(
QgsFeature &feature );
290 bool checkGeometryValidity(
const QgsFeature &feature );
328 QPointer< QgsVectorLayer > mLayer;
339 QgsVectorLayerSelectedFeatureIterator(
const QgsFeatureIds &selectedFeatureIds,
344 bool close()
override;
359 #endif // QGSVECTORLAYERFEATUREITERATOR_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsExpressionContextScope mLayerScope
virtual SpatialIndexPresence hasSpatialIndex() const
Returns an enum value representing the presence of a valid spatial index on the source,...
virtual QgsCoordinateReferenceSystem sourceCrs() const =0
Returns the coordinate reference system for features in the source.
virtual void setInterruptionChecker(QgsFeedback *interruptionChecker)
Attach an object that can be queried regularly by the iterator to check if it must stopped.
bool nextFeatureFilterExpression(QgsFeature &f) override
Overrides default method as we only need to filter features in the edit buffer while for others filte...
QgsFeatureMap mAddedFeatures
const QgsCoordinateReferenceSystem & crs
QgsAttributeList mDeletedAttributeIds
QgsChangedAttributesMap mChangedAttributeValues
Type
The WKB type describes the number of dimensions a geometry has.
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
QList< int > QgsAttributeList
QgsGeometryMap mChangedGeometries
int joinField
Index of field (of the joined layer) must have equal value.
QgsVectorLayer * joinLayer
Resolved pointer to the joined layer.
virtual QString sourceName() const =0
Returns a friendly display name for the source.
QList< QgsField > mAddedAttributes
SpatialIndexPresence
Enumeration of spatial index presence states.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const =0
Returns an iterator for the features in the source.
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
int indexOffset
At what position the joined fields start.
QSet< QgsFeatureId > QgsFeatureIds
virtual bool rewind()=0
reset the iterator to the starting position
QgsCoordinateReferenceSystem mCrs
virtual QgsFields fields() const =0
Returns the fields associated with features in the source.
Single scope for storing variables and functions for use within a QgsExpressionContext....
int targetField
Index of field (of this layer) that drives the join.
virtual long featureCount() const =0
Returns the number of features contained in the source, or -1 if the feature count is unknown.
Join information prepared for fast attribute id mapping in QgsVectorLayerJoinBuffer::updateFeatureAtt...
virtual QgsWkbTypes::Type wkbType() const =0
Returns the geometry type for features returned by this source.
virtual bool fetchFeature(QgsFeature &f)=0
If you write a feature iterator for your provider, this is the method you need to implement!...
QgsAttributeList attributes
Attributes to fetch.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest())=0
Gets an iterator for features matching the specified request.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
const QgsVectorLayerJoinInfo * joinInfo
Canonical source of information about the join.
QgsFeatureIds mDeletedFeatureIds
virtual bool close()=0
end of iterating: free the resources / lock
virtual QgsExpressionContextScope * createExpressionContextScope() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...