QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsAbstractFeatureIterator Class Reference

Internal feature iterator to be implemented within data providers. More...

#include <qgsfeatureiterator.h>

Inheritance diagram for QgsAbstractFeatureIterator:
Inheritance graph
[legend]
Collaboration diagram for QgsAbstractFeatureIterator:
Collaboration graph
[legend]

Public Member Functions

 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)=0
 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 ref ()
void deref ()

Protected Attributes

QgsFeatureRequest mRequest
bool mClosed
int refs

Friends

class QgsFeatureIterator

Detailed Description

Internal feature iterator to be implemented within data providers.

Definition at line 24 of file qgsfeatureiterator.h.

Constructor & Destructor Documentation

QgsAbstractFeatureIterator::QgsAbstractFeatureIterator ( const QgsFeatureRequest request)

base class constructor - stores the iteration parameters

Definition at line 18 of file qgsfeatureiterator.cpp.

QgsAbstractFeatureIterator::~QgsAbstractFeatureIterator ( )
virtual

destructor makes sure that the iterator is closed properly

Definition at line 25 of file qgsfeatureiterator.cpp.

Member Function Documentation

virtual bool QgsAbstractFeatureIterator::close ( )
pure virtual

end of iterating: free the resources / lock

Implemented in QgsCachedFeatureWriterIterator, QgsCachedFeatureIterator, and QgsVectorLayerFeatureIterator.

Referenced by QgsFeatureIterator::close().

void QgsAbstractFeatureIterator::deref ( )
protected
virtual bool QgsAbstractFeatureIterator::nextFeature ( QgsFeature f)
pure virtual

fetch next feature, return true on success

Implemented in QgsCachedFeatureWriterIterator, QgsCachedFeatureIterator, and QgsVectorLayerFeatureIterator.

Referenced by QgsFeatureIterator::nextFeature().

void QgsAbstractFeatureIterator::ref ( )
protected

Definition at line 29 of file qgsfeatureiterator.cpp.

References refs.

Referenced by QgsFeatureIterator::operator=(), and QgsFeatureIterator::QgsFeatureIterator().

virtual bool QgsAbstractFeatureIterator::rewind ( )
pure virtual

reset the iterator to the starting position

Implemented in QgsCachedFeatureWriterIterator, QgsCachedFeatureIterator, and QgsVectorLayerFeatureIterator.

Referenced by QgsFeatureIterator::rewind().

Friends And Related Function Documentation

friend class QgsFeatureIterator
friend

Definition at line 49 of file qgsfeatureiterator.h.

Referenced by QgsVectorLayerCache::getFeatures().

Member Data Documentation

bool QgsAbstractFeatureIterator::mClosed
protected
QgsFeatureRequest QgsAbstractFeatureIterator::mRequest
protected
int QgsAbstractFeatureIterator::refs
protected

Definition at line 46 of file qgsfeatureiterator.h.

Referenced by deref(), and ref().


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