A container for features with the same fields and crs.
More...
#include <qgsfeaturestore.h>
|
| 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...
|
|
virtual | ~QgsFeatureSink ()=default |
|
virtual bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
| Adds a single feature to the sink. More...
|
|
virtual bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
| Adds all features from the specified iterator to the sink. More...
|
|
virtual bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0 |
| Adds a list of features 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...
|
|
virtual QString | lastError () const |
| Returns the most recent error encountered by the sink, e.g. More...
|
|
A container for features with the same fields and crs.
Definition at line 32 of file qgsfeaturestore.h.
◆ QgsFeatureStore() [1/2]
QgsFeatureStore::QgsFeatureStore |
( |
| ) |
|
|
default |
◆ QgsFeatureStore() [2/2]
◆ addFeature()
bool QgsFeatureStore::addFeature |
( |
QgsFeature & |
feature, |
|
|
QgsFeatureSink::Flags |
flags = QgsFeatureSink::Flags() |
|
) |
| |
|
overridevirtual |
Adds a single feature to the sink.
Feature addition behavior is controlled by the specified flags.
- See also
- addFeatures()
- Returns
true
in case of success and false
in case of failure
Reimplemented from QgsFeatureSink.
Definition at line 35 of file qgsfeaturestore.cpp.
◆ addFeatures()
bool QgsFeatureStore::addFeatures |
( |
QgsFeatureList & |
features, |
|
|
QgsFeatureSink::Flags |
flags = QgsFeatureSink::Flags() |
|
) |
| |
|
overridevirtual |
Adds a list of features to the sink.
Feature addition behavior is controlled by the specified flags.
- See also
- addFeature()
- Returns
true
in case of success and false
in case of failure
Implements QgsFeatureSink.
Definition at line 43 of file qgsfeaturestore.cpp.
◆ count()
int QgsFeatureStore::count |
( |
| ) |
const |
|
inline |
Returns the number of features contained in the store.
Definition at line 71 of file qgsfeaturestore.h.
◆ crs()
◆ features()
Returns the list of features contained in the store.
Definition at line 93 of file qgsfeaturestore.h.
◆ fields()
◆ params()
QMap< QString, QVariant > QgsFeatureStore::params |
( |
| ) |
const |
|
inline |
◆ setCrs()
◆ setFields()
void QgsFeatureStore::setFields |
( |
const QgsFields & |
fields | ) |
|
Sets the store's fields.
Every contained feature's fields will be reset to match fields.
- See also
- fields()
Definition at line 25 of file qgsfeaturestore.cpp.
◆ setParams()
void QgsFeatureStore::setParams |
( |
const QMap< QString, QVariant > & |
parameters | ) |
|
|
inline |
The documentation for this class was generated from the following files: