15#ifndef QGSFEATURESTORE_H
16#define QGSFEATURESTORE_H
51 void setFields(
const QgsFields &fields );
73 int count()
const {
return mFeatures.size(); }
83 sipRes = sipCpp->count();
106 void setParams(
const QMap<QString, QVariant> ¶meters ) { mParams = parameters; }
112 QMap<QString, QVariant>
params()
const {
return mParams; }
122 QMap<QString, QVariant> mParams;
137 % ConvertFromTypeCode
141 if ( ( l = PyList_New( sipCpp->size() ) ) == NULL )
145 for (
int i = 0; i < sipCpp->size(); ++i )
150 if ( ( tobj = sipConvertFromNewType( v, sipType_QgsFeatureStore, Py_None ) ) == NULL )
158 PyList_SET_ITEM( l, i, tobj );
166 if ( sipIsErr == NULL )
168 if ( !PyList_Check( sipPy ) )
171 for ( SIP_SSIZE_T i = 0; i < PyList_GET_SIZE( sipPy ); ++i )
172 if ( !sipCanConvertToType( PyList_GET_ITEM( sipPy, i ), sipType_QgsFeatureStore, SIP_NOT_NONE ) )
179 SIP_SSIZE_T listSize = PyList_GET_SIZE( sipPy );
180 qv->reserve( listSize );
182 for ( SIP_SSIZE_T i = 0; i < listSize; ++i )
184 PyObject *obj = PyList_GET_ITEM( sipPy, i );
186 QgsFeatureStore *t =
reinterpret_cast<QgsFeatureStore *
>( sipConvertToType( obj, sipType_QgsFeatureStore, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr ) );
190 sipReleaseType( t, sipType_QgsFeatureStore, state );
197 sipReleaseType( t, sipType_QgsFeatureStore, state );
202 return sipGetState( sipTransferObj );
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
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