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

#include <qgsvectorlayerfeatureiterator.h>

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

Classes

struct  FetchJoinInfo
 Join information prepared for fast attribute id mapping in QgsVectorLayerJoinBuffer::updateFeatureAttributes(). More...

Public Member Functions

 QgsVectorLayerFeatureIterator (QgsVectorLayer *layer, const QgsFeatureRequest &request)
 ~QgsVectorLayerFeatureIterator ()
virtual bool nextFeature (QgsFeature &feature)
 fetch next feature, return true on success
virtual bool rewind ()
 reset the iterator to the starting position
virtual bool close ()
 end of iterating: free the resources / lock
- 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

Protected Member Functions

void rewindEditBuffer ()
void prepareJoins ()
bool fetchNextAddedFeature (QgsFeature &f)
bool fetchNextChangedGeomFeature (QgsFeature &f)
void useAddedFeature (const QgsFeature &src, QgsFeature &f)
void useChangedAttributeFeature (QgsFeatureId fid, const QgsGeometry &geom, QgsFeature &f)
bool nextFeatureFid (QgsFeature &f)
void addJoinedAttributes (QgsFeature &f)
void updateChangedAttributes (QgsFeature &f)
 Update feature with uncommited attribute updates.
void updateFeatureGeometry (QgsFeature &f)
 Update feature with uncommited geometry updates.
- Protected Member Functions inherited from QgsAbstractFeatureIterator
void ref ()
void deref ()

Protected Attributes

QgsVectorLayerL
QgsFeatureRequest mProviderRequest
QgsFeatureIterator mProviderIterator
QSet< QgsFeatureIdmFetchConsidered
QgsGeometryMap::ConstIterator mFetchChangedGeomIt
QgsFeatureMap::ConstIterator mFetchAddedFeaturesIt
bool mFetchedFid
QgsFeatureMap mAddedFeatures
QgsGeometryMap mChangedGeometries
QgsFeatureIds mDeletedFeatureIds
QList< QgsFieldmAddedAttributes
QgsChangedAttributesMap mChangedAttributeValues
QgsAttributeList mDeletedAttributeIds
QMap< QgsVectorLayer
*, FetchJoinInfo
mFetchJoinInfo
 Informations about joins used in the current select() statement.
- Protected Attributes inherited from QgsAbstractFeatureIterator
QgsFeatureRequest mRequest
bool mClosed
int refs

Detailed Description

Definition at line 28 of file qgsvectorlayerfeatureiterator.h.

Constructor & Destructor Documentation

QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator ( QgsVectorLayer layer,
const QgsFeatureRequest request 
)
QgsVectorLayerFeatureIterator::~QgsVectorLayerFeatureIterator ( )

Definition at line 75 of file qgsvectorlayerfeatureiterator.cpp.

References close().

Member Function Documentation

void QgsVectorLayerFeatureIterator::addJoinedAttributes ( QgsFeature f)
protected
bool QgsVectorLayerFeatureIterator::close ( )
virtual

end of iterating: free the resources / lock

Implements QgsAbstractFeatureIterator.

Definition at line 157 of file qgsvectorlayerfeatureiterator.cpp.

References QgsFeatureIterator::close(), QgsAbstractFeatureIterator::mClosed, and mProviderIterator.

Referenced by nextFeature(), and ~QgsVectorLayerFeatureIterator().

bool QgsVectorLayerFeatureIterator::fetchNextAddedFeature ( QgsFeature f)
protected
bool QgsVectorLayerFeatureIterator::fetchNextChangedGeomFeature ( QgsFeature f)
protected
bool QgsVectorLayerFeatureIterator::nextFeature ( QgsFeature feature)
virtual
bool QgsVectorLayerFeatureIterator::nextFeatureFid ( QgsFeature f)
protected
void QgsVectorLayerFeatureIterator::prepareJoins ( )
protected
bool QgsVectorLayerFeatureIterator::rewind ( )
virtual
void QgsVectorLayerFeatureIterator::rewindEditBuffer ( )
protected
void QgsVectorLayerFeatureIterator::updateChangedAttributes ( QgsFeature f)
protected

Update feature with uncommited attribute updates.

Definition at line 508 of file qgsvectorlayerfeatureiterator.cpp.

References QgsFeature::attributes(), QgsFeature::id(), mAddedAttributes, mChangedAttributeValues, and mDeletedAttributeIds.

Referenced by nextFeature(), nextFeatureFid(), and useChangedAttributeFeature().

void QgsVectorLayerFeatureIterator::updateFeatureGeometry ( QgsFeature f)
protected

Update feature with uncommited geometry updates.

Definition at line 530 of file qgsvectorlayerfeatureiterator.cpp.

References QgsFeature::id(), mChangedGeometries, and QgsFeature::setGeometry().

Referenced by nextFeature().

void QgsVectorLayerFeatureIterator::useAddedFeature ( const QgsFeature src,
QgsFeature f 
)
protected
void QgsVectorLayerFeatureIterator::useChangedAttributeFeature ( QgsFeatureId  fid,
const QgsGeometry geom,
QgsFeature f 
)
protected

Member Data Documentation

QgsVectorLayer* QgsVectorLayerFeatureIterator::L
protected
QList<QgsField> QgsVectorLayerFeatureIterator::mAddedAttributes
protected
QgsFeatureMap QgsVectorLayerFeatureIterator::mAddedFeatures
protected
QgsChangedAttributesMap QgsVectorLayerFeatureIterator::mChangedAttributeValues
protected
QgsGeometryMap QgsVectorLayerFeatureIterator::mChangedGeometries
protected
QgsAttributeList QgsVectorLayerFeatureIterator::mDeletedAttributeIds
protected
QgsFeatureIds QgsVectorLayerFeatureIterator::mDeletedFeatureIds
protected
QgsFeatureMap::ConstIterator QgsVectorLayerFeatureIterator::mFetchAddedFeaturesIt
protected

Definition at line 62 of file qgsvectorlayerfeatureiterator.h.

Referenced by fetchNextAddedFeature(), and rewindEditBuffer().

QgsGeometryMap::ConstIterator QgsVectorLayerFeatureIterator::mFetchChangedGeomIt
protected
QSet<QgsFeatureId> QgsVectorLayerFeatureIterator::mFetchConsidered
protected
bool QgsVectorLayerFeatureIterator::mFetchedFid
protected
QMap<QgsVectorLayer*, FetchJoinInfo> QgsVectorLayerFeatureIterator::mFetchJoinInfo
protected

Informations about joins used in the current select() statement.

Allows faster mapping of attribute ids compared to mVectorJoins

Definition at line 109 of file qgsvectorlayerfeatureiterator.h.

Referenced by addJoinedAttributes(), nextFeature(), nextFeatureFid(), prepareJoins(), useAddedFeature(), and useChangedAttributeFeature().

QgsFeatureIterator QgsVectorLayerFeatureIterator::mProviderIterator
protected
QgsFeatureRequest QgsVectorLayerFeatureIterator::mProviderRequest
protected

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