QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsgeometrycache.h
Go to the documentation of this file.
1 #ifndef QGSGEOMETRYCACHE_H
2 #define QGSGEOMETRYCACHE_H
3 
4 #include "qgsfeature.h"
5 
6 #include "qgsvectorlayer.h"
7 
8 class CORE_EXPORT QgsGeometryCache
9 {
10  public:
13 
14  inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; }
15 
17  bool geometry( QgsFeatureId fid, QgsGeometry& geometry );
18 
20  void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom );
21 
23  void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove( fid ); }
24 
25 
27  void deleteCachedGeometries();
28 
29  void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeometriesRect = extent; }
30  const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRect; }
31 
32  protected:
33 
34  inline QgsVectorLayerEditBuffer* editBuffer() { return L->editBuffer(); }
35 
37 
40 
43 
44 };
45 
46 #endif // QGSGEOMETRYCACHE_H