15 #ifndef QGSFEATURESTORE_H
16 #define QGSFEATURESTORE_H
18 #include "qgis_core.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 );