QGIS/python/core/qgsfeaturestore.sip
Nyall Dawson fc339f9ac5 Add a flag argument to QgsFeatureSink::addFeatures
Flags can be used to control how features are added to the sink.

For now, there's only a single flag available - FastInsert.
When FastInsert is set, faster inserts will be use at the cost
of updating the passed features to reflect changes made at the
provider.

This includes skipping the update of the passed feature IDs
to match the resulting feature IDs for the feature within
the data provider.

Individual sink subclasses may or may not choose to respect
this flag, depending on whether or not skipping this update
represents a significant speed boost for the operation.

QgsVectorLayer always ignores the flag - feature ids are
required for the featureAdded signal to be correctly emitted,
and it's expected that performance critical applications will
add features directly to a data provider instead of
via QgsVectorLayer's edit buffer.
2017-06-15 17:04:27 +10:00

109 lines
2.9 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeaturestore.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsFeatureStore : QgsFeatureSink
{
%Docstring
A container for features with the same fields and crs.
%End
%TypeHeaderCode
#include "qgsfeaturestore.h"
%End
public:
QgsFeatureStore();
%Docstring
Constructor
%End
QgsFeatureStore( const QgsFields &fields, const QgsCoordinateReferenceSystem &crs );
%Docstring
Constructor
%End
QgsFields fields() const;
%Docstring
Returns the store's field list.
.. seealso:: setFields()
:rtype: QgsFields
%End
void setFields( const QgsFields &fields );
%Docstring
Sets the store's ``fields``. Every contained feature's fields will be reset to match ``fields``.
.. seealso:: fields()
%End
QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the store's coordinate reference system.
.. seealso:: setCrs()
:rtype: QgsCoordinateReferenceSystem
%End
void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the store's ``crs``.
.. seealso:: crs()
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
int count() const;
%Docstring
Returns the number of features contained in the store.
:rtype: int
%End
int __len__() const;
%Docstring
Returns the number of features contained in the store.
:rtype: int
%End
%MethodCode
sipRes = sipCpp->count();
%End
QgsFeatureList features() const;
%Docstring
Returns the list of features contained in the store.
:rtype: QgsFeatureList
%End
void setParams( const QMap<QString, QVariant> &parameters );
%Docstring
Sets a map of optional ``parameters`` for the store.
.. seealso:: params()
%End
QMap<QString, QVariant> params() const;
%Docstring
Returns the map of optional parameters.
.. seealso:: setParams()
:rtype: QMap<str, QVariant>
%End
};
typedef QList<QgsFeatureStore> QgsFeatureStoreList;
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeaturestore.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/