aboutsummaryrefslogtreecommitdiff
path: root/src/experimental/cachecalc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/experimental/cachecalc.h')
-rw-r--r--src/experimental/cachecalc.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/experimental/cachecalc.h b/src/experimental/cachecalc.h
index ecfa3f4..cb5c755 100644
--- a/src/experimental/cachecalc.h
+++ b/src/experimental/cachecalc.h
@@ -14,50 +14,50 @@
14 14
15namespace Bu 15namespace Bu
16{ 16{
17 template<class keytype, class obtype> class Cache; 17 template<class keytype, class obtype> class Cache;
18 18
19 template<class keytype, class obtype> 19 template<class keytype, class obtype>
20 class CacheCalc 20 class CacheCalc
21 { 21 {
22 friend class Cache<keytype, obtype>; 22 friend class Cache<keytype, obtype>;
23 private: 23 private:
24 typedef Cache<keytype, obtype> MyCache; 24 typedef Cache<keytype, obtype> MyCache;
25 public: 25 public:
26 CacheCalc() : 26 CacheCalc() :
27 pCache( (MyCache *)0 ) 27 pCache( (MyCache *)0 )
28 { 28 {
29 TRACE(); 29 TRACE();
30 } 30 }
31 31
32 virtual ~CacheCalc() 32 virtual ~CacheCalc()
33 { 33 {
34 TRACE(); 34 TRACE();
35 } 35 }
36 36
37 virtual void onLoad( obtype *pSrc, const keytype &key )=0; 37 virtual void onLoad( obtype *pSrc, const keytype &key )=0;
38 virtual void onUnload( obtype *pSrc, const keytype &key )=0; 38 virtual void onUnload( obtype *pSrc, const keytype &key )=0;
39 virtual void onDestroy( obtype *pSrc, const keytype &key )=0; 39 virtual void onDestroy( obtype *pSrc, const keytype &key )=0;
40 virtual void onDestroy( const keytype &key )=0; 40 virtual void onDestroy( const keytype &key )=0;
41 virtual bool shouldSync( obtype *pSrc, const keytype &key, 41 virtual bool shouldSync( obtype *pSrc, const keytype &key,
42 time_t tLastSync )=0; 42 time_t tLastSync )=0;
43 virtual void onTick() { }; 43 virtual void onTick() { };
44 44
45 protected: 45 protected:
46 MyCache *getCache() 46 MyCache *getCache()
47 { 47 {
48 TRACE(); 48 TRACE();
49 return pCache; 49 return pCache;
50 } 50 }
51 51
52 private: 52 private:
53 void setCache( MyCache *pCache ) 53 void setCache( MyCache *pCache )
54 { 54 {
55 TRACE(); 55 TRACE();
56 this->pCache = pCache; 56 this->pCache = pCache;
57 } 57 }
58 58
59 MyCache *pCache; 59 MyCache *pCache;
60 }; 60 };
61}; 61};
62 62
63#endif 63#endif