QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
virtual ~QgsAbstractFeatureIterator ()
 destructor makes sure that the iterator is closed properly
virtual bool nextFeature (QgsFeature &f)
 fetch next feature, return true on success
virtual bool rewind ()=0
 reset the iterator to the starting position
virtual bool close ()=0
 end of iterating: free the resources / lock

Protected Member Functions

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

Protected Attributes

T * mSource
bool mOwnSource
- Protected Attributes inherited from QgsAbstractFeatureIterator
QgsFeatureRequest mRequest
 A copy of the feature request.
bool mClosed
 Set to true, as soon as the iterator is closed.
int refs
 reference counting (to allow seamless copying of QgsFeatureIterator instances)

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

to be called by from subclass in close()

Member Data Documentation

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

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