QGIS API Documentation  2.2.0-Valmiera
 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  : L( layer )
7 {
8 }
9 
11 {
12  // Destroy any cached geometries and clear the references to them
14 }
15 
17 {
18  // no need to check changed geometries because all changed geometries are also cached
19 
20  // first time this geometry has changed since last commit
21  if ( !mCachedGeometries.contains( fid ) )
22  return false;
23 
24  geometry = mCachedGeometries[fid];
25  return true;
26 }
27 
29 {
30  mCachedGeometries[fid] = geom;
31 }
32 
33 
35 {
36  // Destroy any cached geometries
37  mCachedGeometries.clear();
39 }