18 #ifndef QGSFEATURESINK_H 19 #define QGSFEATURESINK_H 21 #include "qgis_core.h" 55 RegeneratePrimaryKey = 1 << 1,
57 Q_DECLARE_FLAGS( SinkFlags,
SinkFlag )
72 Q_DECLARE_FLAGS( Flags,
Flag )
81 virtual bool addFeature(
QgsFeature &feature, QgsFeatureSink::Flags flags =
nullptr );
88 virtual bool addFeatures(
QgsFeatureList &features, QgsFeatureSink::Flags flags =
nullptr ) = 0;
94 virtual bool addFeatures(
QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags =
nullptr );
103 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureSink::Flags )
127 bool addFeature(
QgsFeature &feature, QgsFeatureSink::Flags flags =
nullptr )
override {
return mSink->addFeature( feature, flags ); }
128 bool addFeatures(
QgsFeatureList &features, QgsFeatureSink::Flags flags =
nullptr )
override {
return mSink->addFeatures( features, flags ); }
143 #endif // QGSFEATURESINK_H Wrapper for iterator of features from vector data provider or vector layer.
A simple feature sink which proxies feature addition on to another feature sink.
QList< QgsFeature > QgsFeatureList
An interface for objects which accept features via addFeature(s) methods.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=nullptr) override
Adds a list of features to the sink.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
bool addFeatures(QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=nullptr) override
Adds all features from the specified iterator to the sink.
virtual bool flushBuffer()
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to...
SinkFlag
Flags that can be set on a QgsFeatureSink.
Flag
Flags controlling how features are added to a sink.
bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=nullptr) override
Adds a single feature to the sink.
QgsFeatureSink * destinationSink()
Returns the destination QgsFeatureSink which the proxy will forward features to.