-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a QgsFeatureSink interface for classes which accept adding features
- Loading branch information
1 parent
13b4472
commit 3633363
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturesink.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsFeatureSink | ||
{ | ||
%Docstring | ||
An interface for objects which accept features via addFeature(s) methods. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfeaturesink.h" | ||
%End | ||
public: | ||
|
||
virtual ~QgsFeatureSink(); | ||
|
||
virtual bool addFeature( QgsFeature &feature ) = 0; | ||
%Docstring | ||
Adds a single ``feature`` to the sink. | ||
\see addFeatures() | ||
:rtype: bool | ||
%End | ||
|
||
virtual bool addFeatures( QgsFeatureList &features ) = 0; | ||
%Docstring | ||
Adds a list of ``features`` to the sink. | ||
\see addFeature() | ||
:rtype: bool | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfeaturesink.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
qgsfeaturesink.h | ||
---------------- | ||
begin : April 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSFEATURESINK_H | ||
#define QGSFEATURESINK_H | ||
|
||
#include "qgis_core.h" | ||
#include "qgis.h" | ||
#include "qgsfeature.h" | ||
|
||
/** | ||
* \class QgsFeatureSink | ||
* \ingroup core | ||
* An interface for objects which accept features via addFeature(s) methods. | ||
* | ||
* \since QGIS 3.0 | ||
*/ | ||
class CORE_EXPORT QgsFeatureSink | ||
{ | ||
public: | ||
|
||
virtual ~QgsFeatureSink() = default; | ||
|
||
/** | ||
* Adds a single \a feature to the sink. | ||
* \see addFeatures() | ||
*/ | ||
virtual bool addFeature( QgsFeature &feature ) = 0; | ||
|
||
/** | ||
* Adds a list of \a features to the sink. | ||
* \see addFeature() | ||
*/ | ||
virtual bool addFeatures( QgsFeatureList &features ) = 0; | ||
|
||
}; | ||
|
||
#endif // QGSFEATURESINK_H |