QGIS API Documentation  2.6.0-Brighton
 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 "qgsgeometry.h"
5 #include "qgsfeature.h"
6 #include "qgsrectangle.h"
7 
8 #include <QMap>
9 
10 class CORE_EXPORT QgsGeometryCache
11 {
12  public:
15 
16  inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; }
17 
19  bool geometry( QgsFeatureId fid, QgsGeometry& geometry );
20 
22  void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom );
23 
25  void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove( fid ); }
26 
27 
29  void deleteCachedGeometries();
30 
31  void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeometriesRect = extent; }
32  const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRect; }
33 
34  protected:
35 
38 
41 
42 };
43 
44 #endif // QGSGEOMETRYCACHE_H