mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
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 or 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.
109 lines
2.8 KiB
Plaintext
109 lines
2.8 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 );
|
|
|
|
virtual bool addFeatures( QgsFeatureList &features );
|
|
|
|
|
|
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> ¶meters );
|
|
%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 *
|
|
************************************************************************/
|