QGIS/python/core/auto_generated/qgsfeaturesink.sip.in

87 lines
2.8 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeaturesink.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsFeatureSink
{
%Docstring
2017-12-15 10:36:55 -04:00
An interface for objects which accept features via addFeature(s) methods.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsfeaturesink.h"
%End
public:
enum SinkFlag
{
RegeneratePrimaryKey,
};
typedef QFlags<QgsFeatureSink::SinkFlag> SinkFlags;
enum Flag
{
FastInsert,
};
typedef QFlags<QgsFeatureSink::Flag> Flags;
virtual ~QgsFeatureSink();
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Adds a single ``feature`` to the sink. Feature addition behavior is controlled by the specified ``flags``.
.. seealso:: :py:func:`addFeatures`
2017-12-15 10:36:55 -04:00
2019-02-26 19:54:09 +10:00
:return: ``True`` in case of success and ``False`` in case of failure
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ) = 0;
%Docstring
2017-12-15 10:36:55 -04:00
Adds a list of ``features`` to the sink. Feature addition behavior is controlled by the specified ``flags``.
.. seealso:: :py:func:`addFeature`
2017-12-15 10:36:55 -04:00
2019-02-26 19:54:09 +10:00
:return: ``True`` in case of success and ``False`` in case of failure
%End
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Adds all features from the specified ``iterator`` to the sink. Feature addition behavior is controlled by the specified ``flags``.
2019-02-26 19:54:09 +10:00
:return: ``True`` if all features were added successfully, or ``False`` if any feature could not be added
%End
virtual bool flushBuffer();
%Docstring
2017-12-15 10:36:55 -04:00
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination.
2019-02-26 19:54:09 +10:00
:return: ``False`` if any buffered features could not be added to the sink.
%End
};
QFlags<QgsFeatureSink::Flag> operator|(QgsFeatureSink::Flag f1, QFlags<QgsFeatureSink::Flag> f2);
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeaturesink.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/