27 class QgsMemoryFeatureIterator;
36 ~QgsMemoryProvider()
override;
39 static QString providerKey();
41 static QString providerDescription();
53 QString
dataSourceUri(
bool expandAuthConfig =
true )
const override;
61 bool addAttributes(
const QList<QgsField> &attributes )
override;
67 bool setSubsetString(
const QString &theSQL,
bool updateFeatureCount =
true )
override;
70 QgsVectorDataProvider::Capabilities
capabilities()
const override;
74 QString
name()
const override;
97 QString mSubsetString;
99 friend class QgsMemoryFeatureSource;
Wrapper for iterator of features from vector data provider or vector layer.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
A rectangle specified with double values.
virtual QString subsetString() const
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
virtual QgsVectorDataProvider::Capabilities capabilities() const
Returns flags containing the supported capabilities.
QgsWkbTypes::Type wkbType() const override=0
Returns the geometry type which is returned by this layer.
virtual void updateExtents()
Update the extents of the layer.
virtual bool addAttributes(const QList< QgsField > &attributes)
Adds new attributes to the provider.
QSet< QgsFeatureId > QgsFeatureIds
bool addFeatures(QgsFeatureList &flist, QgsFeatureSink::Flags flags=nullptr) override
Adds a list of features to the sink.
QList< QgsFeature > QgsFeatureList
virtual bool deleteFeatures(const QgsFeatureIds &id)
Deletes one or more features from the provider.
virtual bool renameAttributes(const QgsFieldNameMap &renamedAttributes)
Renames existing attributes.
Container of fields for a vector layer.
virtual QString name() const =0
Returns a provider name.
virtual QgsAbstractFeatureSource * featureSource() const =0
Returns feature source object that can be used for querying provider's data.
QSet< int > QgsAttributeIds
virtual bool createSpatialIndex()
Creates a spatial index on the datasource (if supported by the provider type).
Type
The WKB type describes the number of dimensions a geometry has.
virtual bool isValid() const =0
Returns true if this is a valid layer.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate system for the data source.
QgsFields fields() const override=0
Returns the fields associated with this data provider.
virtual bool changeAttributeValues(const QgsChangedAttributesMap &attr_map)
Changes attribute values of existing features.
virtual QString dataSourceUri(bool expandAuthConfig=false) const
Gets the data source specification.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
virtual bool supportsSubsetString() const
Returns true if the provider supports setting of subset strings.
virtual bool changeGeometryValues(const QgsGeometryMap &geometry_map)
Changes geometries of existing features.
Base class that can be used for any class that is capable of returning features.
QMap< int, QString > QgsFieldNameMap
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
Setting options for creating vector data providers.
A spatial index for QgsFeature objects.
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const override=0
Query the provider for features specified in request.
long featureCount() const override=0
Number of features in the layer.
This class represents a coordinate reference system (CRS).
virtual QString description() const =0
Returns description.
virtual bool deleteAttributes(const QgsAttributeIds &attributes)
Deletes existing attributes from the provider.
virtual QgsRectangle extent() const =0
Returns the extent of the layer.
virtual QString storageType() const
Returns the permanent storage type for this layer as a friendly name.
This is the base class for vector data providers.