QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsgeometrycache.cpp
Go to the documentation of this file.
1 #include "qgsgeometrycache.h"
2 
4 
6 {
7 }
8 
10 {
11  // Destroy any cached geometries and clear the references to them
13 }
14 
16 {
17  // no need to check changed geometries because all changed geometries are also cached
18 
19  // first time this geometry has changed since last commit
20  if ( !mCachedGeometries.contains( fid ) )
21  return false;
22 
23  geometry = mCachedGeometries[fid];
24  return true;
25 }
26 
28 {
29  mCachedGeometries[fid] = geom;
30 }
31 
32 
34 {
35  // Destroy any cached geometries
36  mCachedGeometries.clear();
38 }
A rectangle specified with double values.
Definition: qgsrectangle.h:35
void deleteCachedGeometries()
Deletes the geometries in mCachedGeometries.
QgsRectangle mCachedGeometriesRect
extent for which there are cached geometries
bool geometry(QgsFeatureId fid, QgsGeometry &geometry)
fetch geometry from cache, return true if successful
QgsGeometryMap mCachedGeometries
cache of the committed geometries retrieved for the current display
void cacheGeometry(QgsFeatureId fid, const QgsGeometry &geom)
store a geometry in the cache
qint64 QgsFeatureId
Definition: qgsfeature.h:30