]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/partcache.h
Add API declarations
[libs/gltk.git] / source / partcache.h
index 969912431271d501b68267f9f09bb7b05f0427b6..9dc71bf184c8652de6b5e4939a8bab9224a2f512 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/gl/mesh.h>
 #include <msp/gl/texture2d.h>
+#include "mspgltk_api.h"
 
 namespace Msp {
 namespace GLtk {
@@ -19,9 +20,19 @@ struct CachedPart
        ~CachedPart();
 };
 
-class PartCache
+class MSPGLTK_API PartCache
 {
 public:
+       class Rebuild
+       {
+       private:
+               PartCache &cache;
+
+       public:
+               Rebuild(PartCache &c): cache(c) { cache.begin_rebuild(); }
+               ~Rebuild() { cache.end_rebuild(); }
+       };
+
        typedef std::list<CachedPart> PartList;
 
 private: