Skip to content
Permalink
Browse files
Don't force use of In,Out in QgsFeatureSink methods
  • Loading branch information
nyalldawson committed Apr 26, 2017
1 parent 49d4b5e commit 128077961775a2dc42a986bcb54a0ce3837d7bae
@@ -24,15 +24,15 @@ class QgsFeatureSink

virtual ~QgsFeatureSink();

virtual bool addFeature( QgsFeature &feature /In,Out/ ) = 0;
virtual bool addFeature( QgsFeature &feature ) = 0;
%Docstring
Adds a single ``feature`` to the sink.
\see addFeatures()
:return: true in case of success and false in case of failure
:rtype: bool
%End

virtual bool addFeatures( QgsFeatureList &features /In,Out/ ) = 0;
virtual bool addFeatures( QgsFeatureList &features ) = 0;
%Docstring
Adds a list of ``features`` to the sink.
\see addFeature()
@@ -53,9 +53,9 @@ Constructor
\see crs()
%End

virtual bool addFeature( QgsFeature &feature /In,Out/ );
virtual bool addFeature( QgsFeature &feature );

virtual bool addFeatures( QgsFeatureList &features /In,Out/ );
virtual bool addFeatures( QgsFeatureList &features );


QgsFeatureList features() const;
@@ -380,8 +380,8 @@ class QgsVectorFileWriter : QgsFeatureSink
/** Retrieves error message */
QString errorMessage();

bool addFeature( QgsFeature &feature /In,Out/ );
bool addFeatures( QgsFeatureList &features /In,Out/ );
bool addFeature( QgsFeature &feature );
bool addFeatures( QgsFeatureList &features );

/** Add feature to the currently opened data source */
bool addFeature( QgsFeature& feature, QgsFeatureRenderer* renderer, QgsUnitTypes::DistanceUnit outputUnit = QgsUnitTypes::DistanceMeters );
@@ -901,7 +901,7 @@ Return the provider type for this layer
:rtype: QgsFeatureIterator
%End

virtual bool addFeature( QgsFeature &feature /In,Out/ );
virtual bool addFeature( QgsFeature &feature );

%Docstring
Adds a single ``feature`` to the layer.
@@ -1260,7 +1260,7 @@ Delete an attribute field (but does not commit it)
:rtype: bool
%End

virtual bool addFeatures( QgsFeatureList &features /In,Out/ );
virtual bool addFeatures( QgsFeatureList &features );


bool deleteFeature( QgsFeatureId fid );
@@ -40,14 +40,14 @@ class CORE_EXPORT QgsFeatureSink
* \see addFeatures()
* \returns true in case of success and false in case of failure
*/
virtual bool addFeature( QgsFeature &feature SIP_INOUT ) = 0;
virtual bool addFeature( QgsFeature &feature ) = 0;

/**
* Adds a list of \a features to the sink.
* \see addFeature()
* \returns true in case of success and false in case of failure
*/
virtual bool addFeatures( QgsFeatureList &features SIP_INOUT ) = 0;
virtual bool addFeatures( QgsFeatureList &features ) = 0;

};

@@ -61,8 +61,8 @@ class CORE_EXPORT QgsFeatureStore : public QgsFeatureSink
*/
void setCrs( const QgsCoordinateReferenceSystem &crs ) { mCrs = crs; }

bool addFeature( QgsFeature &feature SIP_INOUT ) override;
bool addFeatures( QgsFeatureList &features SIP_INOUT ) override;
bool addFeature( QgsFeature &feature ) override;
bool addFeatures( QgsFeatureList &features ) override;

/**
* Returns the list of features contained in the store.
@@ -881,7 +881,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* \see addFeatures()
* \returns true in case of success and false in case of failure
*/
bool addFeature( QgsFeature &feature SIP_INOUT ) override;
bool addFeature( QgsFeature &feature ) override;

/** Updates an existing feature. This method needs to query the datasource
on every call. Consider using changeAttributeValue() or
@@ -1205,7 +1205,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
bool deleteAttributes( QList<int> attrs );

bool addFeatures( QgsFeatureList &features SIP_INOUT ) override;
bool addFeatures( QgsFeatureList &features ) override;

//! Delete a feature from the layer (but does not commit it)
bool deleteFeature( QgsFeatureId fid );

0 comments on commit 1280779

Please sign in to comment.