QGIS API Documentation
3.6.0-Noosa (5873452)
|
A simple feature sink which proxies feature addition on to another feature sink. More...
#include <qgsfeaturesink.h>
Public Member Functions | |
QgsProxyFeatureSink (QgsFeatureSink *sink) | |
Constructs a new QgsProxyFeatureSink which forwards features onto a destination sink. More... | |
bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=nullptr) override |
Adds a single feature to the sink. More... | |
bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=nullptr) override |
Adds a list of features to the sink. More... | |
bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=nullptr) override |
Adds all features from the specified iterator to the sink. More... | |
QgsFeatureSink * | destinationSink () |
Returns the destination QgsFeatureSink which the proxy will forward features to. More... | |
Public Member Functions inherited from QgsFeatureSink | |
virtual | ~QgsFeatureSink ()=default |
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 simple feature sink which proxies feature addition on to another feature sink.
This class is designed to allow factory methods which always return new QgsFeatureSink objects. Since it is not always possible to create an entirely new QgsFeatureSink (e.g. if the feature sink is a layer's data provider), a new QgsProxyFeatureSink can instead be returned which forwards features on to the destination sink. The proxy sink can be safely deleted without affecting the destination sink.
Definition at line 119 of file qgsfeaturesink.h.
QgsProxyFeatureSink::QgsProxyFeatureSink | ( | QgsFeatureSink * | sink | ) |
Constructs a new QgsProxyFeatureSink which forwards features onto a destination sink.
Definition at line 46 of file qgsfeaturesink.cpp.
|
inlineoverridevirtual |
Adds a single feature to the sink.
Feature addition behavior is controlled by the specified flags.
Reimplemented from QgsFeatureSink.
Reimplemented in QgsProcessingFeatureSink.
Definition at line 127 of file qgsfeaturesink.h.
|
inlineoverridevirtual |
Adds a list of features to the sink.
Feature addition behavior is controlled by the specified flags.
Implements QgsFeatureSink.
Reimplemented in QgsProcessingFeatureSink.
Definition at line 128 of file qgsfeaturesink.h.
|
inlineoverridevirtual |
Adds all features from the specified iterator to the sink.
Feature addition behavior is controlled by the specified flags.
Reimplemented from QgsFeatureSink.
Reimplemented in QgsProcessingFeatureSink.
Definition at line 129 of file qgsfeaturesink.h.
|
inline |
Returns the destination QgsFeatureSink which the proxy will forward features to.
Definition at line 134 of file qgsfeaturesink.h.