summaryrefslogtreecommitdiff
path: root/src/cachehandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cachehandler.h')
-rw-r--r--src/cachehandler.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/cachehandler.h b/src/cachehandler.h
index 6ce1471..3b26970 100644
--- a/src/cachehandler.h
+++ b/src/cachehandler.h
@@ -1,15 +1,31 @@
1#ifndef BU_CACHE_HANDLER_H 1#ifndef BU_CACHE_HANDLER_H
2#define BU_CACHE_HANDLER_H 2#define BU_CACHE_HANDLER_H
3 3
4#include "bu/cptr.h"
5
4namespace Bu 6namespace Bu
5{ 7{
8 /**
9 * Handles I/O for data in the cache. This also assigns ID's to the newly
10 * created objects that are requested through this system.
11 */
12 template<class T>
6 class CacheHandler 13 class CacheHandler
7 { 14 {
8 public: 15 public:
9 CacheHandler(); 16 CacheHandler()
10 virtual ~CacheHandler(); 17 {
11 virtual void load()=0; 18 }
12 virtual void unload()=0; 19
20 virtual ~CacheHandler()
21 {
22 }
23
24 virtual Bu::CPtr<T> load()=0;
25 virtual void unload( Bu::CPtr<T> pObj )=0;
26 virtual Bu::CPtr<T> create()=0;
27 virtual Bu::CPtr<T> create( T &rSrc )=0;
28 virtual void destroy( Bu::CPtr<T> pObj )=0;
13 29
14 private: 30 private:
15 }; 31 };