15#ifndef QGSFEATURESTORE_H
16#define QGSFEATURESTORE_H
51 void setFields(
const QgsFields &fields );
73 int count()
const {
return mFeatures.size(); }
82 sipRes = sipCpp->count();
101 void setParams(
const QMap<QString, QVariant> ¶meters ) { mParams = parameters; }
107 QMap<QString, QVariant>
params()
const {
return mParams; }
117 QMap<QString, QVariant> mParams;
131 % ConvertFromTypeCode
135 if ( ( l = PyList_New( sipCpp->size() ) ) == NULL )
139 for (
int i = 0; i < sipCpp->size(); ++i )
144 if ( ( tobj = sipConvertFromNewType( v, sipType_QgsFeatureStore, Py_None ) ) == NULL )
152 PyList_SET_ITEM( l, i, tobj );
160 if ( sipIsErr == NULL )
162 if ( !PyList_Check( sipPy ) )
165 for ( SIP_SSIZE_T i = 0; i < PyList_GET_SIZE( sipPy ); ++i )
166 if ( !sipCanConvertToType( PyList_GET_ITEM( sipPy, i ), sipType_QgsFeatureStore, SIP_NOT_NONE ) )
173 SIP_SSIZE_T listSize = PyList_GET_SIZE( sipPy );
174 qv->reserve( listSize );
176 for ( SIP_SSIZE_T i = 0; i < listSize; ++i )
178 PyObject *obj = PyList_GET_ITEM( sipPy, i );
180 QgsFeatureStore *t =
reinterpret_cast<QgsFeatureStore *
>( sipConvertToType( obj, sipType_QgsFeatureStore, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr ) );
184 sipReleaseType( t, sipType_QgsFeatureStore, state );
191 sipReleaseType( t, sipType_QgsFeatureStore, state );
196 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