15 #ifndef QGSVECTORLAYERFEATUREITERATOR_H 16 #define QGSVECTORLAYERFEATUREITERATOR_H 18 #include "qgis_core.h" 122 bool close()
override;
139 void addJoinedAttributesCached(
QgsFeature &
f,
const QVariant &joinValue )
const;
140 void addJoinedAttributesDirect(
QgsFeature &
f,
const QVariant &joinValue )
const;
144 bool isValid()
const override;
148 bool fetchFeature(
QgsFeature &feature )
override;
163 void prepareJoin(
int fieldIdx )
SIP_SKIP;
166 void prepareExpression(
int fieldIdx )
SIP_SKIP;
172 void prepareField(
int fieldIdx )
SIP_SKIP;
239 QMap<const QgsVectorLayerJoinInfo *, QgsVectorLayerFeatureIterator::FetchJoinInfo>
mFetchJoinInfo;
250 std::unique_ptr<QgsExpressionContext> mExpressionContext;
254 QList< int > mPreparedFields;
255 QList< int > mFieldsToPrepare;
258 QList< FetchJoinInfo > mOrderedJoinInfoList;
264 bool prepareOrderBy(
const QList<QgsFeatureRequest::OrderByClause> &orderBys )
override;
269 void createOrderedJoinList();
274 bool postProcessFeature(
QgsFeature &feature );
279 bool checkGeometryValidity(
const QgsFeature &feature );
317 QPointer< QgsVectorLayer > mLayer;
321 #endif // QGSVECTORLAYERFEATUREITERATOR_H Wrapper for iterator of features from vector data provider or vector layer.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
const QgsVectorLayerJoinInfo * joinInfo
Canonical source of information about the join.
virtual bool close()=0
end of iterating: free the resources / lock
A rectangle specified with double values.
virtual QgsFields fields() const =0
Returns the fields associated with features in the source.
QgsFeatureIterator mProviderIterator
QMap< int, QgsExpression * > mExpressionFieldInfo
QgsFeatureMap::ConstIterator mFetchAddedFeaturesIt
QgsGeometryMap::ConstIterator mFetchChangedGeomIt
QSet< QgsFeatureId > QgsFeatureIds
virtual bool rewind()=0
reset the iterator to the starting position
virtual QgsWkbTypes::Type wkbType() const =0
Returns the geometry type for features returned by this source.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest())=0
Get an iterator for features matching the specified request.
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
QList< QgsField > mAddedAttributes
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsVectorLayer * joinLayer
Resolved pointer to the joined layer.
Manages joined fields for a vector layer.
int joinField
Index of field (of the joined layer) must have equal value.
QgsFeatureRequest mChangedFeaturesRequest
Base class for feedback objects to be used for cancelation of something running in a worker thread...
QgsExpressionContextScope mLayerScope
Type
The WKB type describes the number of dimensions a geometry has.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Defines left outer join from our vector layer to some other vector layer.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QgsFeatureRequest mProviderRequest
QgsGeometryMap mChangedGeometries
QgsFeatureIds mDeletedFeatureIds
QgsAttributeList mDeletedAttributeIds
Single scope for storing variables and functions for use within a QgsExpressionContext.
Base class that can be used for any class that is capable of returning features.
QSet< QgsFeatureId > mFetchConsidered
virtual QgsCoordinateReferenceSystem sourceCrs() const =0
Returns the coordinate reference system for features in the source.
Partial snapshot of vector layer's state (only the members necessary for access to features) ...
int indexOffset
At what position the joined fields start.
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
int targetField
Index of field (of this layer) that drives the join.
virtual QgsExpressionContextScope * createExpressionContextScope() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Buffers information about expression fields for a vector layer.
QgsFeatureSource subclass for the selected features from a QgsVectorLayer.
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
Abstract interface for generating an expression context scope.
An interface for objects which provide features via a getFeatures method.
QgsFeatureMap mAddedFeatures
QMap< const QgsVectorLayerJoinInfo *, QgsVectorLayerFeatureIterator::FetchJoinInfo > mFetchJoinInfo
Information about joins used in the current select() statement.
This class represents a coordinate reference system (CRS).
Join information prepared for fast attribute id mapping in QgsVectorLayerJoinBuffer::updateFeatureAtt...
virtual void setInterruptionChecker(QgsFeedback *interruptionChecker)
Attach an object that can be queried regularly by the iterator to check if it must stopped...
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
QgsCoordinateReferenceSystem mCrs
QList< int > QgsAttributeList
bool mHasVirtualAttributes
QgsChangedAttributesMap mChangedAttributeValues
virtual QString sourceName() const =0
Returns a friendly display name for the source.
Represents a vector layer which manages a vector based data sets.
QgsCoordinateTransform mTransform
QgsAttributeList attributes
Attributes to fetch.
bool nextFeatureFilterExpression(QgsFeature &f) override
Overrides default method as we only need to filter features in the edit buffer while for others filte...
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const =0
Returns an iterator for the features in the source.
QgsFeatureIterator mChangedFeaturesIterator
Helper template that cares of two things: 1.
virtual long featureCount() const =0
Returns the number of features contained in the source, or -1 if the feature count is unknown...