QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgsfeaturestore.h>
Public Member Functions | |
QgsFeatureStore ()=default | |
Constructor. More... | |
QgsFeatureStore (const QgsFields &fields, const QgsCoordinateReferenceSystem &crs) | |
Constructor. More... | |
bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
Adds a single feature to the sink. More... | |
bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
Adds a list of features to the sink. More... | |
int | count () const |
Returns the number of features contained in the store. More... | |
QgsCoordinateReferenceSystem | crs () const |
Returns the store's coordinate reference system. More... | |
QgsFeatureList | features () const |
Returns the list of features contained in the store. More... | |
QgsFields | fields () const |
Returns the store's field list. More... | |
QMap< QString, QVariant > | params () const |
Returns the map of optional parameters. More... | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the store's crs. More... | |
void | setFields (const QgsFields &fields) |
Sets the store's fields. More... | |
void | setParams (const QMap< QString, QVariant > ¶meters) |
Sets a map of optional parameters for the store. More... | |
Public Member Functions inherited from QgsFeatureSink | |
virtual | ~QgsFeatureSink ()=default |
virtual bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
Adds all features from the specified iterator to the sink. More... | |
virtual bool | flushBuffer () |
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination. More... | |
Additional Inherited Members | |
Public Types inherited from QgsFeatureSink | |
enum | Flag { FastInsert = 1 << 1 } |
Flags controlling how features are added to a sink. More... | |
enum | SinkFlag { RegeneratePrimaryKey = 1 << 1 } |
Flags that can be set on a QgsFeatureSink. More... | |
A container for features with the same fields and crs.
Definition at line 32 of file qgsfeaturestore.h.
|
default |
Constructor.
QgsFeatureStore::QgsFeatureStore | ( | const QgsFields & | fields, |
const QgsCoordinateReferenceSystem & | crs | ||
) |
Constructor.
Definition at line 19 of file qgsfeaturestore.cpp.
|
overridevirtual |
Adds a single feature to the sink.
Feature addition behavior is controlled by the specified flags.
true
in case of success and false
in case of failure Reimplemented from QgsFeatureSink.
Definition at line 35 of file qgsfeaturestore.cpp.
|
overridevirtual |
Adds a list of features to the sink.
Feature addition behavior is controlled by the specified flags.
true
in case of success and false
in case of failure Implements QgsFeatureSink.
Definition at line 43 of file qgsfeaturestore.cpp.
|
inline |
Returns the number of features contained in the store.
Definition at line 84 of file qgsfeaturestore.h.
|
inline |
Returns the store's coordinate reference system.
Definition at line 70 of file qgsfeaturestore.h.
|
inline |
Returns the list of features contained in the store.
Definition at line 106 of file qgsfeaturestore.h.
|
inline |
Returns the store's field list.
Definition at line 58 of file qgsfeaturestore.h.
|
inline |
Returns the map of optional parameters.
Definition at line 118 of file qgsfeaturestore.h.
|
inline |
void QgsFeatureStore::setFields | ( | const QgsFields & | fields | ) |
Sets the store's fields.
Every contained feature's fields will be reset to match fields.
Definition at line 25 of file qgsfeaturestore.cpp.
|
inline |
Sets a map of optional parameters for the store.
Definition at line 112 of file qgsfeaturestore.h.