mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
This check tests that if a function has been declared deprecated with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note then it MUST have both the Q_DECL_DEPRECATD and @deprecated note. It's important that both are used, as Q_DECL_DEPRECATED allows throwing a warning if that method is used in code, while the @deprecated doxygen note gives an indication to devs/PyQGIS users of why it's deprecated and what should be used instead. Ideally we'd also test for SIP /Deprecated/ tags, but I can't find any reliable way to do this.
109 lines
3.2 KiB
Plaintext
109 lines
3.2 KiB
Plaintext
class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgscachedfeatureiterator.h>
|
|
%End
|
|
public:
|
|
/**
|
|
* This constructor creates a feature iterator, that delivers only cached information, based on the
|
|
* @link QgsFeatureIds @endlink. No request is made to the backend.
|
|
*
|
|
* @param vlCache The vector layer cache to use
|
|
* @param featureRequest The feature request to answer
|
|
* @param featureIds The feature ids to return
|
|
*
|
|
* @deprecated Use QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest )
|
|
* instead
|
|
*/
|
|
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest, const QgsFeatureIds& featureIds ) /Deprecated/;
|
|
|
|
/**
|
|
* This constructor creates a feature iterator, that delivers all cached features. No request is made to the backend.
|
|
*
|
|
* @param vlCache The vector layer cache to use
|
|
* @param featureRequest The feature request to answer
|
|
*/
|
|
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
|
|
|
|
/**
|
|
* Rewind to the beginning of the iterator
|
|
*
|
|
* @return bool true if the operation was ok
|
|
*/
|
|
virtual bool rewind();
|
|
|
|
/**
|
|
* Close this iterator. No further features will be available.
|
|
*
|
|
* @return true if successful
|
|
*/
|
|
virtual bool close();
|
|
|
|
// QgsAbstractFeatureIterator interface
|
|
protected:
|
|
/**
|
|
* Implementation for fetching a feature.
|
|
*
|
|
* @param f Will write to this feature
|
|
* @return bool true if the operation was ok
|
|
*
|
|
* @see bool getFeature( QgsFeature& f )
|
|
*/
|
|
virtual bool fetchFeature( QgsFeature& f );
|
|
|
|
/**
|
|
* We have a local special iterator for FilterFids, no need to run the generic.
|
|
*
|
|
* @param f Will write to this feature
|
|
* @return bool true if the operation was ok
|
|
*/
|
|
virtual bool nextFeatureFilterFids( QgsFeature& f );
|
|
|
|
};
|
|
|
|
/**
|
|
* @brief
|
|
* Uses another iterator as backend and writes features to the cache
|
|
*
|
|
*/
|
|
class QgsCachedFeatureWriterIterator : QgsAbstractFeatureIterator
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgscachedfeatureiterator.h>
|
|
%End
|
|
public:
|
|
/**
|
|
* This constructor creates a feature iterator, which queries the backend and caches retrieved features.
|
|
*
|
|
* @param vlCache The vector layer cache to use
|
|
* @param featureRequest The feature request to answer
|
|
*/
|
|
QgsCachedFeatureWriterIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
|
|
|
|
/**
|
|
* Rewind to the beginning of the iterator
|
|
*
|
|
* @return bool true if the operation was ok
|
|
*/
|
|
virtual bool rewind();
|
|
|
|
/**
|
|
* Close this iterator. No further features will be available.
|
|
*
|
|
* @return true if successful
|
|
*/
|
|
virtual bool close();
|
|
|
|
protected:
|
|
|
|
/**
|
|
* Implementation for fetching a feature.
|
|
*
|
|
* @param f Will write to this feature
|
|
* @return bool true if the operation was ok
|
|
*
|
|
* @see bool getFeature( QgsFeature& f )
|
|
*/
|
|
virtual bool fetchFeature( QgsFeature& f );
|
|
};
|