QGIS API Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsAbstractFeatureIteratorFromSource< T > Class Template Reference

Helper template that cares of two things: 1. More...

#include <qgsfeatureiterator.h>

Inheritance diagram for QgsAbstractFeatureIteratorFromSource< T >:
Inheritance graph
[legend]

Public Member Functions

 QgsAbstractFeatureIteratorFromSource (T *source, bool ownSource, const QgsFeatureRequest &request)
 
 ~QgsAbstractFeatureIteratorFromSource ()
 
- Public Member Functions inherited from QgsAbstractFeatureIterator
 QgsAbstractFeatureIterator (const QgsFeatureRequest &request)
 base class constructor - stores the iteration parameters More...
 
virtual ~QgsAbstractFeatureIterator ()
 destructor makes sure that the iterator is closed properly More...
 
virtual bool close ()=0
 end of iterating: free the resources / lock More...
 
CompileStatus compileStatus () const
 Returns the status of expression compilation for filter expression requests. More...
 
virtual bool nextFeature (QgsFeature &f)
 fetch next feature, return true on success More...
 
virtual bool rewind ()=0
 reset the iterator to the starting position More...
 
virtual void setInterruptionChecker (QgsInterruptionChecker *interruptionChecker)
 Attach an object that can be queried regularly by the iterator to check if it must stopped. More...
 

Protected Member Functions

void iteratorClosed ()
 to be called by from subclass in close() More...
 
- Protected Member Functions inherited from QgsAbstractFeatureIterator
void deref ()
 remove reference, delete if refs == 0 More...
 
virtual bool fetchFeature (QgsFeature &f)=0
 If you write a feature iterator for your provider, this is the method you need to implement!! More...
 
virtual bool nextFeatureFilterExpression (QgsFeature &f)
 By default, the iterator will fetch all features and check if the feature matches the expression. More...
 
virtual bool nextFeatureFilterFids (QgsFeature &f)
 By default, the iterator will fetch all features and check if the id is in the request. More...
 
virtual bool prepareSimplification (const QgsSimplifyMethod &simplifyMethod)
 Setup the simplification of geometries to fetch using the specified simplify method. More...
 
void ref ()
 add reference More...
 

Protected Attributes

bool mOwnSource
 
T * mSource
 
- Protected Attributes inherited from QgsAbstractFeatureIterator
bool mClosed
 Set to true, as soon as the iterator is closed. More...
 
CompileStatus mCompileStatus
 Status of compilation of filter expression. More...
 
long mFetchedCount
 Number of features already fetched by iterator. More...
 
QgsFeatureRequest mRequest
 A copy of the feature request. More...
 
bool mZombie
 A feature iterator may be closed already but still be serving features from the cache. More...
 
int refs
 reference counting (to allow seamless copying of QgsFeatureIterator instances) TODO QGIS3: make this private More...
 

Additional Inherited Members

- Public Types inherited from QgsAbstractFeatureIterator
enum  CompileStatus { NoCompilation, PartiallyCompiled, Compiled }
 Status of expression compilation for filter expression requests. More...
 

Detailed Description

template<typename T>
class QgsAbstractFeatureIteratorFromSource< T >

Helper template that cares of two things: 1.

automatic deletion of source if owned by iterator, 2. notification of open/closed iterator.

Note
not available in Python bindings

Definition at line 188 of file qgsfeatureiterator.h.

Constructor & Destructor Documentation

template<typename T>
QgsAbstractFeatureIteratorFromSource< T >::QgsAbstractFeatureIteratorFromSource ( T *  source,
bool  ownSource,
const QgsFeatureRequest request 
)
inline

Definition at line 191 of file qgsfeatureiterator.h.

Definition at line 197 of file qgsfeatureiterator.h.

Member Function Documentation

template<typename T>
void QgsAbstractFeatureIteratorFromSource< T >::iteratorClosed ( )
inlineprotected

to be called by from subclass in close()

Definition at line 205 of file qgsfeatureiterator.h.

Member Data Documentation

template<typename T>
bool QgsAbstractFeatureIteratorFromSource< T >::mOwnSource
protected

Definition at line 208 of file qgsfeatureiterator.h.

template<typename T>
T* QgsAbstractFeatureIteratorFromSource< T >::mSource
protected

Definition at line 207 of file qgsfeatureiterator.h.


The documentation for this class was generated from the following file: