28 QgsFeatureList::iterator it = mFeatures.begin();
29 for ( ; it != mFeatures.end(); ++it )
31 ( *it ).setFields( mFields );
39 mFeatures.append( f );
45 QgsFeatureList::iterator fIt = features.begin();
46 for ( ; fIt != features.end(); ++fIt )
void setFields(const QgsFields &fields, bool initAttributes=false)
Assign a field map with the feature to allow attribute access by attribute name.
QList< QgsFeature > QgsFeatureList
Container of fields for a vector layer.
bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=nullptr) override
Adds a single feature to the sink.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setFields(const QgsFields &fields)
Sets the store's fields.
bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=nullptr) override
Adds a list of features to the sink.
QgsFeatureStore()=default
Constructor.
QgsFields fields() const
Returns the store's field list.
This class represents a coordinate reference system (CRS).
QgsFeatureList features() const
Returns the list of features contained in the store.