15#ifndef QGSVECTORLAYERFEATUREITERATOR_H
16#define QGSVECTORLAYERFEATUREITERATOR_H
165 bool rewind()
override;
168 bool close()
override;
183 QMap<int, int> attributesSourceToDestLayerMap
SIP_SKIP;
212 void addJoinedAttributesCached(
QgsFeature &f,
const QVariant &joinValue )
const;
213 void addJoinedAttributesDirect(
QgsFeature &f,
const QVariant &joinValue )
const;
216 bool isValid()
const override;
220 bool fetchFeature(
QgsFeature &feature )
override;
235 void prepareJoin(
int fieldIdx )
SIP_SKIP;
238 void prepareExpression(
int fieldIdx )
SIP_SKIP;
244 void prepareField(
int fieldIdx )
SIP_SKIP;
301 bool mHasValidTransform = false;
307 double mDistanceWithin = 0;
324 bool mHasVirtualAttributes;
331 void createExpressionContext();
332 std::unique_ptr<QgsExpressionContext> mExpressionContext;
336 QList< int > mPreparedFields;
337 QList< int > mFieldsToPrepare;
340 QList< FetchJoinInfo > mOrderedJoinInfoList;
346 bool prepareOrderBy(
const QList<QgsFeatureRequest::OrderByClause> &orderBys )
override;
351 void createOrderedJoinList();
356 bool postProcessFeature(
QgsFeature &feature );
361 bool checkGeometryValidity(
const QgsFeature &feature );
363 bool mDelegatedOrderByToProvider =
false;
394 long long featureCount()
const override;
395 QString sourceName()
const override;
410 QPointer< QgsVectorLayer > mLayer;
421 QgsVectorLayerSelectedFeatureIterator(
const QgsFeatureIds &selectedFeatureIds,
426 bool close()
override;
WkbType
The WKB type describes the number of dimensions a geometry has.
Helper template that cares of two things: 1.
Internal feature iterator to be implemented within data providers.
virtual bool rewind()=0
reset the iterator to the starting position
virtual bool fetchFeature(QgsFeature &f)=0
If you write a feature iterator for your provider, this is the method you need to implement!...
virtual bool close()=0
end of iterating: free the resources / lock
Base class that can be used for any class that is capable of returning features.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest())=0
Gets an iterator for features matching the specified request.
This class represents a coordinate reference system (CRS).
Abstract interface for generating an expression context scope.
Single scope for storing variables and functions for use within a QgsExpressionContext.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Buffers information about expression fields for a vector layer.
Class for parsing and evaluation of expressions (formerly called "search strings").
Wrapper for iterator of features from vector data provider or vector layer.
This class wraps a request for features to a vector layer (or directly its vector data provider).
An interface for objects which provide features via a getFeatures method.
SpatialIndexPresence
Enumeration of spatial index presence states.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Container of fields for a vector layer.
A geometry engine is a low-level representation of a QgsAbstractGeometry object, optimised for use wi...
A geometry is the spatial representation of a feature.
A rectangle specified with double values.
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
bool nextFeatureFilterExpression(QgsFeature &f) override
Overrides default method as we only need to filter features in the edit buffer while for others filte...
Partial snapshot of vector layer's state (only the members necessary for access to features)
QgsChangedAttributesMap mChangedAttributeValues
QgsCoordinateReferenceSystem mCrs
QList< QgsField > mAddedAttributes
std::unique_ptr< QgsAbstractFeatureSource > mProviderFeatureSource
~QgsVectorLayerFeatureSource() override
QgsFeatureIds mDeletedFeatureIds
QgsAttributeList mDeletedAttributeIds
QgsExpressionContextScope mLayerScope
QgsVectorLayerFeatureSource(const QgsVectorLayerFeatureSource &other)=delete
QgsVectorLayerFeatureSource cannot be copied.
std::unique_ptr< QgsVectorLayerJoinBuffer > mJoinBuffer
std::unique_ptr< QgsExpressionFieldBuffer > mExpressionFieldBuffer
QMap< QString, JoinLayerSource > mJoinSources
Contains prepared join sources by layer ID.
QgsFeatureMap mAddedFeatures
QgsVectorLayerFeatureSource & operator==(const QgsVectorLayerFeatureSource &other)=delete
QgsVectorLayerFeatureSource cannot be copied.
QgsGeometryMap mChangedGeometries
Manages joined fields for a vector layer.
Defines left outer join from our vector layer to some other vector layer.
QgsFeatureSource subclass for the selected features from a QgsVectorLayer.
QgsVectorLayerSelectedFeatureSource(const QgsVectorLayerSelectedFeatureSource &other)=delete
QgsVectorLayerSelectedFeatureSource cannot be copied.
QgsVectorLayerSelectedFeatureSource & operator==(const QgsVectorLayerSelectedFeatureSource &other)=delete
QgsVectorLayerSelectedFeatureSource cannot be copied.
Represents a vector layer which manages a vector based data sets.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
QSet< QgsFeatureId > QgsFeatureIds
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
QList< int > QgsAttributeList
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
const QgsCoordinateReferenceSystem & crs
Join information prepared for fast attribute id mapping in QgsVectorLayerJoinBuffer::updateFeatureAtt...
std::shared_ptr< QgsVectorLayerFeatureSource > joinSource
Feature source for join.
QgsFields joinLayerFields
Fields from joined layer.
int targetField
Index of field (of this layer) that drives the join.
const QgsVectorLayerJoinInfo * joinInfo
Canonical source of information about the join.
QgsAttributeList attributes
Attributes to fetch.
int indexOffset
At what position the joined fields start.
Contains join layer source information prepared in a thread-safe way, ready for vector layer feature ...
std::shared_ptr< QgsVectorLayerFeatureSource > joinSource
Feature source for join.
QgsFields joinLayerFields
Fields from joined layer.