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 | List of all members
QgsGeometryCache Class Reference

#include <qgsgeometrycache.h>

Collaboration diagram for QgsGeometryCache:
Collaboration graph
[legend]

Public Member Functions

 QgsGeometryCache (QgsVectorLayer *layer)
 ~QgsGeometryCache ()
QgsGeometryMapcachedGeometries ()
bool geometry (QgsFeatureId fid, QgsGeometry &geometry)
 fetch geometry from cache, return true if successful
void cacheGeometry (QgsFeatureId fid, const QgsGeometry &geom)
 store a geometry in the cache
void removeGeometry (QgsFeatureId fid)
 get rid of the cached geometry
void deleteCachedGeometries ()
 Deletes the geometries in mCachedGeometries.
void setCachedGeometriesRect (const QgsRectangle &extent)
const QgsRectanglecachedGeometriesRect ()

Protected Member Functions

QgsVectorLayerEditBuffereditBuffer ()

Protected Attributes

QgsVectorLayerL
QgsGeometryMap mCachedGeometries
 cache of the committed geometries retrieved for the current display
QgsRectangle mCachedGeometriesRect
 extent for which there are cached geometries

Detailed Description

Definition at line 8 of file qgsgeometrycache.h.

Constructor & Destructor Documentation

QgsGeometryCache::QgsGeometryCache ( QgsVectorLayer layer)

Definition at line 5 of file qgsgeometrycache.cpp.

QgsGeometryCache::~QgsGeometryCache ( )

Definition at line 10 of file qgsgeometrycache.cpp.

References deleteCachedGeometries().

Member Function Documentation

QgsGeometryMap& QgsGeometryCache::cachedGeometries ( )
inline

Definition at line 14 of file qgsgeometrycache.h.

Referenced by QgsVectorLayer::snapWithContext().

const QgsRectangle& QgsGeometryCache::cachedGeometriesRect ( )
inline

Definition at line 30 of file qgsgeometrycache.h.

Referenced by QgsVectorLayer::snapWithContext().

void QgsGeometryCache::cacheGeometry ( QgsFeatureId  fid,
const QgsGeometry geom 
)
void QgsGeometryCache::deleteCachedGeometries ( )

Deletes the geometries in mCachedGeometries.

Definition at line 34 of file qgsgeometrycache.cpp.

References mCachedGeometries, and mCachedGeometriesRect.

Referenced by QgsVectorLayer::commitChanges(), QgsVectorLayer::draw(), QgsVectorLayer::rollBack(), and ~QgsGeometryCache().

QgsVectorLayerEditBuffer* QgsGeometryCache::editBuffer ( )
inlineprotected

Definition at line 34 of file qgsgeometrycache.h.

bool QgsGeometryCache::geometry ( QgsFeatureId  fid,
QgsGeometry geometry 
)
void QgsGeometryCache::removeGeometry ( QgsFeatureId  fid)
inline

get rid of the cached geometry

Definition at line 23 of file qgsgeometrycache.h.

Referenced by QgsVectorLayerUndoCommandAddFeature::undo().

void QgsGeometryCache::setCachedGeometriesRect ( const QgsRectangle extent)
inline

Definition at line 29 of file qgsgeometrycache.h.

Referenced by QgsVectorLayer::draw().

Member Data Documentation

QgsVectorLayer* QgsGeometryCache::L
protected

Definition at line 36 of file qgsgeometrycache.h.

QgsGeometryMap QgsGeometryCache::mCachedGeometries
protected

cache of the committed geometries retrieved for the current display

Definition at line 39 of file qgsgeometrycache.h.

Referenced by cacheGeometry(), deleteCachedGeometries(), and geometry().

QgsRectangle QgsGeometryCache::mCachedGeometriesRect
protected

extent for which there are cached geometries

Definition at line 42 of file qgsgeometrycache.h.

Referenced by deleteCachedGeometries().


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