-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sipify QgsVectorLayerFeatureIterator
- Loading branch information
Showing
9 changed files
with
231 additions
and
135 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
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
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 |
---|---|---|
@@ -1,93 +1,147 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsvectorlayerfeatureiterator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
// abstract feature iterator implementations are not part of public API | ||
|
||
|
||
|
||
|
||
|
||
%ModuleHeaderCode | ||
#include "qgsfeatureiterator.h" | ||
%End | ||
|
||
class QgsVectorLayerFeatureSource : QgsAbstractFeatureSource | ||
{ | ||
%Docstring | ||
Partial snapshot of vector layer's state (only the members necessary for access to features) | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include <qgsvectorlayerfeatureiterator.h> | ||
#include "qgsvectorlayerfeatureiterator.h" | ||
%End | ||
public: | ||
|
||
/** Constructor for QgsVectorLayerFeatureSource. | ||
* \param layer source layer | ||
*/ | ||
explicit QgsVectorLayerFeatureSource( const QgsVectorLayer *layer ); | ||
%Docstring | ||
Constructor for QgsVectorLayerFeatureSource. | ||
\param layer source layer | ||
%End | ||
|
||
~QgsVectorLayerFeatureSource(); | ||
|
||
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ); | ||
QgsFields fields(); | ||
|
||
|
||
QgsFields fields() const; | ||
%Docstring | ||
Returns the fields that will be available for features that are retrieved from | ||
this source. | ||
|
||
.. versionadded:: 3.0 | ||
:rtype: QgsFields | ||
%End | ||
|
||
protected: | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
}; | ||
|
||
class QgsVectorLayerFeatureIterator : QgsAbstractFeatureIterator | ||
|
||
typedef QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource> QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSourceBase; | ||
|
||
class QgsVectorLayerFeatureIterator : QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSourceBase | ||
{ | ||
|
||
%TypeHeaderCode | ||
#include <qgsvectorlayerfeatureiterator.h> | ||
#include "qgsvectorlayerfeatureiterator.h" | ||
#include "qgsfeatureiterator.h" | ||
typedef QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource> QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSourceBase; | ||
%End | ||
public: | ||
QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource *source, bool ownSource, const QgsFeatureRequest &request ); | ||
|
||
~QgsVectorLayerFeatureIterator(); | ||
|
||
//! reset the iterator to the starting position | ||
virtual bool rewind(); | ||
%Docstring | ||
reset the iterator to the starting position | ||
:rtype: bool | ||
%End | ||
|
||
//! end of iterating: free the resources / lock | ||
virtual bool close(); | ||
%Docstring | ||
end of iterating: free the resources / lock | ||
:rtype: bool | ||
%End | ||
|
||
|
||
struct FetchJoinInfo | ||
{ | ||
const QgsVectorLayerJoinInfo *joinInfo;//!< Canonical source of information about the join | ||
QgsAttributeList attributes; //!< Attributes to fetch | ||
int indexOffset; //!< At what position the joined fields start | ||
QgsVectorLayer *joinLayer; //!< Resolved pointer to the joined layer | ||
int targetField; //!< Index of field (of this layer) that drives the join | ||
int joinField; //!< Index of field (of the joined layer) must have equal value | ||
|
||
void addJoinedAttributesCached( QgsFeature &f, const QVariant &joinValue ) const; | ||
void addJoinedAttributesDirect( QgsFeature &f, const QVariant &joinValue ) const; | ||
}; | ||
|
||
|
||
protected: | ||
//! fetch next feature, return true on success | ||
virtual bool fetchFeature( QgsFeature &feature ); | ||
%Docstring | ||
fetch next feature, return true on success | ||
:rtype: bool | ||
%End | ||
|
||
//! Overrides default method as we only need to filter features in the edit buffer | ||
//! while for others filtering is left to the provider implementation. | ||
virtual bool nextFeatureFilterExpression( QgsFeature &f ); | ||
%Docstring | ||
while for others filtering is left to the provider implementation. | ||
:rtype: bool | ||
%End | ||
|
||
//! Setup the simplification of geometries to fetch using the specified simplify method | ||
virtual bool prepareSimplification( const QgsSimplifyMethod &simplifyMethod ); | ||
%Docstring | ||
Setup the simplification of geometries to fetch using the specified simplify method | ||
:rtype: bool | ||
%End | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//! @note not available in Python bindings | ||
//void rewindEditBuffer(); | ||
//! @note not available in Python bindings | ||
//void prepareJoins(); | ||
//! @note not available in Python bindings | ||
//void prepareExpressions(); | ||
//! @note not available in Python bindings | ||
//bool fetchNextAddedFeature( QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//bool fetchNextChangedGeomFeature( QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//bool fetchNextChangedAttributeFeature( QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//void useAddedFeature( const QgsFeature &src, QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//void useChangedAttributeFeature( QgsFeatureId fid, const QgsGeometry &geom, QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//bool nextFeatureFid( QgsFeature &f ); | ||
//! @note not available in Python bindings | ||
//void addJoinedAttributes( QgsFeature &f ); | ||
|
||
/** | ||
* Adds attributes that don't source from the provider but are added inside QGIS | ||
* Includes | ||
* - Joined fields | ||
* - Expression fields | ||
* | ||
* @param f The feature will be modified | ||
* @note not available in Python bindings | ||
*/ | ||
//void addVirtualAttributes( QgsFeature &f ); | ||
|
||
/** Update feature with uncommitted attribute updates. | ||
* @note not available in Python bindings | ||
*/ | ||
//void updateChangedAttributes( QgsFeature &f ); | ||
|
||
/** Update feature with uncommitted geometry updates. | ||
* @note not available in Python bindings | ||
*/ | ||
//void updateFeatureGeometry( QgsFeature &f ); | ||
|
||
private: | ||
QgsVectorLayerFeatureIterator( const QgsVectorLayerFeatureIterator &rhs ); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsvectorlayerfeatureiterator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.