mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #4797 from nyalldawson/flush_sink
Move flushBuffer method up to QgsFeatureSink
This commit is contained in:
commit
fe800e25a5
@ -55,6 +55,12 @@ class QgsFeatureSink
|
|||||||
:rtype: bool
|
:rtype: bool
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
virtual bool flushBuffer();
|
||||||
|
%Docstring
|
||||||
|
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination.
|
||||||
|
:return: false if any buffered features could not be added to the sink.
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
};
|
};
|
||||||
|
|
||||||
QFlags<QgsFeatureSink::Flag> operator|(QgsFeatureSink::Flag f1, QFlags<QgsFeatureSink::Flag> f2);
|
QFlags<QgsFeatureSink::Flag> operator|(QgsFeatureSink::Flag f1, QFlags<QgsFeatureSink::Flag> f2);
|
||||||
|
@ -124,12 +124,8 @@ class QgsVectorLayerExporter : QgsFeatureSink
|
|||||||
Finalizes the export and closes the new created layer.
|
Finalizes the export and closes the new created layer.
|
||||||
%End
|
%End
|
||||||
|
|
||||||
bool flushBuffer();
|
virtual bool flushBuffer();
|
||||||
%Docstring
|
|
||||||
Flush the buffer writing the features to the new layer.
|
|
||||||
.. versionadded:: 3.0
|
|
||||||
:rtype: bool
|
|
||||||
%End
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QgsVectorLayerExporter( const QgsVectorLayerExporter &rh );
|
QgsVectorLayerExporter( const QgsVectorLayerExporter &rh );
|
||||||
|
@ -71,6 +71,11 @@ class CORE_EXPORT QgsFeatureSink
|
|||||||
*/
|
*/
|
||||||
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
|
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination.
|
||||||
|
* \returns false if any buffered features could not be added to the sink.
|
||||||
|
*/
|
||||||
|
virtual bool flushBuffer() { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureSink::Flags )
|
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureSink::Flags )
|
||||||
|
@ -141,11 +141,7 @@ class CORE_EXPORT QgsVectorLayerExporter : public QgsFeatureSink
|
|||||||
*/
|
*/
|
||||||
~QgsVectorLayerExporter();
|
~QgsVectorLayerExporter();
|
||||||
|
|
||||||
/**
|
bool flushBuffer() override;
|
||||||
* Flush the buffer writing the features to the new layer.
|
|
||||||
* \since QGIS 3.0
|
|
||||||
*/
|
|
||||||
bool flushBuffer();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user