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 )
100 virtual
bool flushBuffer() {
return true; }
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...
Q_DECLARE_METATYPE(QModelIndex)
bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=nullptr) override
Adds a list of features to the sink.
bool addFeatures(QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=nullptr) override
Adds all features from the specified iterator to the sink.
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.