@@ -32,7 +32,13 @@ class QTextCodec;
32
32
typedef QMap<QString, QString> QgsNewAttributesMap;
33
33
typedef QMap<QString, QVariant::Type> QgsNativeTypeMap;
34
34
35
- /* * Base class for vector data providers
35
+ /* * \ingroup core
36
+ * This is the base class for vector data providers.
37
+ *
38
+ * Data providers abstract the retrieval and writing (where supported)
39
+ * of feature and attrubute information from a spatial datasource.
40
+ *
41
+ *
36
42
*/
37
43
class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
38
44
{
@@ -95,9 +101,9 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
95
101
96
102
/* *
97
103
* Gets the feature at the given feature ID.
98
- * @param featureId id of the feature
99
- * @param feature feature which will receive the data
100
- * @param fetchGeoemtry if true, geometry will be fetched from the provider
104
+ * @param featureId of the feature to be returned
105
+ * @param feature which will receive the data
106
+ * @param fetchGeometry flag which if true, will cause the geometry to be fetched from the provider
101
107
* @param fetchAttributes a list containing the indexes of the attribute fields to copy
102
108
* @return True when feature was found, otherwise false
103
109
*
@@ -138,6 +144,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
138
144
/* *
139
145
* Return a map of indexes with field names for this layer
140
146
* @return map of fields
147
+ * @see QgsFieldMap
141
148
*/
142
149
virtual const QgsFieldMap &fields () const = 0;
143
150
@@ -151,7 +158,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
151
158
virtual void reset () = 0;
152
159
153
160
/* *
154
- * Returns the minimum value of an attributs
161
+ * Returns the minimum value of an attribute
155
162
* @param index the index of the attribute
156
163
*
157
164
* Default implementation walks all numeric attributes and caches minimal
@@ -161,7 +168,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
161
168
virtual QVariant minimumValue ( int index );
162
169
163
170
/* *
164
- * Returns the maximum value of an attributs
171
+ * Returns the maximum value of an attribute
165
172
* @param index the index of the attribute
166
173
*
167
174
* Default implementation walks all numeric attributes and caches minimal
@@ -186,7 +193,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
186
193
virtual bool addFeatures ( QgsFeatureList &flist );
187
194
188
195
/* *
189
- * Deletes a feature
196
+ * Deletes one or more features
190
197
* @param id list containing feature ids to delete
191
198
* @return true in case of success and false in case of failure
192
199
*/
@@ -220,9 +227,10 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
220
227
221
228
/* *
222
229
* Changes geometries of existing features
223
- * @param geometry_map A std::map containing the feature IDs to change the geometries of.
224
- * the second map parameter being the new geometries themselves
225
- * @return true in case of success and false in case of failure
230
+ * @param geometry_map A QgsGeometryMap whose index contains the feature IDs
231
+ * that will have their geometries changed.
232
+ * The second map parameter being the new geometries themselves
233
+ * @return True in case of success and false in case of failure
226
234
*/
227
235
virtual bool changeGeometryValues ( QgsGeometryMap & geometry_map );
228
236
@@ -257,7 +265,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
257
265
/* *
258
266
* Returns the index of a field name or -1 if the field does not exist
259
267
*/
260
- int indexFromFieldName ( const QString& fieldName ) const ;
268
+ int fieldNameIndex ( const QString& fieldName ) const ;
261
269
262
270
/* *
263
271
* Return list of indexes to fetch all attributes in getNextFeature()
@@ -268,10 +276,10 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
268
276
const QgsNativeTypeMap &supportedNativeTypes () const ;
269
277
270
278
/* *
271
- * Set whether provider should return also features that don't have
279
+ * Set whether provider should also return features that don't have
272
280
* associated geometry. FALSE by default
273
281
*/
274
- void setFetchFeaturesWithoutGeom ( bool fetch );
282
+ void enableGeometrylessFeatures ( bool fetch );
275
283
276
284
protected:
277
285
QVariant convertValue ( QVariant::Type type, QString value );
0 commit comments