15#ifndef QGSFEATURESTORE_H
16#define QGSFEATURESTORE_H
51 void setFields(
const QgsFields &fields );
65 bool addFeature(
QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() )
override;
71 int count()
const {
return mFeatures.size(); }
80 sipRes = sipCpp->count();
99 void setParams(
const QMap<QString, QVariant> ¶meters ) { mParams = parameters; }
105 QMap<QString, QVariant>
params()
const {
return mParams; }
115 QMap<QString, QVariant> mParams;
129 % ConvertFromTypeCode
133 if ( ( l = PyList_New( sipCpp->size() ) ) == NULL )
137 for (
int i = 0; i < sipCpp->size(); ++i )
142 if ( ( tobj = sipConvertFromNewType( v, sipType_QgsFeatureStore, Py_None ) ) == NULL )
150 PyList_SET_ITEM( l, i, tobj );
158 if ( sipIsErr == NULL )
160 if ( !PyList_Check( sipPy ) )
163 for ( SIP_SSIZE_T i = 0; i < PyList_GET_SIZE( sipPy ); ++i )
164 if ( !sipCanConvertToType( PyList_GET_ITEM( sipPy, i ), sipType_QgsFeatureStore, SIP_NOT_NONE ) )
171 SIP_SSIZE_T listSize = PyList_GET_SIZE( sipPy );
172 qv->reserve( listSize );
174 for ( SIP_SSIZE_T i = 0; i < listSize; ++i )
176 PyObject *obj = PyList_GET_ITEM( sipPy, i );
178 QgsFeatureStore *t =
reinterpret_cast<QgsFeatureStore *
>( sipConvertToType( obj, sipType_QgsFeatureStore, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr ) );
182 sipReleaseType( t, sipType_QgsFeatureStore, state );
189 sipReleaseType( t, sipType_QgsFeatureStore, state );
194 return sipGetState( sipTransferObj );
This class represents a coordinate reference system (CRS).
An interface for objects which accept features via addFeature(s) methods.
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
virtual bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0
Adds a list of features to the sink.
A container for features with the same fields and crs.
QgsFeatureList features() const
Returns the list of features contained in the store.
QgsFields fields() const
Returns the store's field list.
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the store's crs.
QMap< QString, QVariant > params() const
Returns the map of optional parameters.
int count() const
Returns the number of features contained in the store.
QgsCoordinateReferenceSystem crs() const
Returns the store's coordinate reference system.
void setParams(const QMap< QString, QVariant > ¶meters)
Sets a map of optional parameters for the store.
QgsFeatureStore()=default
Constructor.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Container of fields for a vector layer.
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
QList< QgsFeature > QgsFeatureList
QVector< QgsFeatureStore > QgsFeatureStoreList
const QgsCoordinateReferenceSystem & crs