QGIS API Documentation  2.9.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 }