diff options
Diffstat (limited to 'src/experimental/cachestore.h')
| -rw-r--r-- | src/experimental/cachestore.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/experimental/cachestore.h b/src/experimental/cachestore.h index a332e49..5052670 100644 --- a/src/experimental/cachestore.h +++ b/src/experimental/cachestore.h | |||
| @@ -12,35 +12,35 @@ | |||
| 12 | 12 | ||
| 13 | namespace Bu | 13 | namespace Bu |
| 14 | { | 14 | { |
| 15 | /** | 15 | /** |
| 16 | * Handles I/O for data in the cache. This also assigns ID's to the newly | 16 | * Handles I/O for data in the cache. This also assigns ID's to the newly |
| 17 | * created objects that are requested through this system. | 17 | * created objects that are requested through this system. |
| 18 | */ | 18 | */ |
| 19 | template<class keytype, class obtype> | 19 | template<class keytype, class obtype> |
| 20 | class CacheStore | 20 | class CacheStore |
| 21 | { | 21 | { |
| 22 | public: | 22 | public: |
| 23 | CacheStore() | 23 | CacheStore() |
| 24 | { | 24 | { |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | virtual ~CacheStore() | 27 | virtual ~CacheStore() |
| 28 | { | 28 | { |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | virtual obtype *load( const keytype &key )=0; | 31 | virtual obtype *load( const keytype &key )=0; |
| 32 | virtual void unload( obtype *pObj, const keytype &key )=0; | 32 | virtual void unload( obtype *pObj, const keytype &key )=0; |
| 33 | virtual keytype create( obtype *pSrc )=0; | 33 | virtual keytype create( obtype *pSrc )=0; |
| 34 | virtual void sync()=0; | 34 | virtual void sync()=0; |
| 35 | virtual void sync( obtype *pObj, const keytype &key )=0; | 35 | virtual void sync( obtype *pObj, const keytype &key )=0; |
| 36 | virtual void destroy( obtype *pObj, const keytype &key )=0; | 36 | virtual void destroy( obtype *pObj, const keytype &key )=0; |
| 37 | virtual void destroy( const keytype &key )=0; | 37 | virtual void destroy( const keytype &key )=0; |
| 38 | virtual bool has( const keytype &key )=0; | 38 | virtual bool has( const keytype &key )=0; |
| 39 | virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); } | 39 | virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); } |
| 40 | virtual int getSize() { return -1; } | 40 | virtual int getSize() { return -1; } |
| 41 | 41 | ||
| 42 | private: | 42 | private: |
| 43 | }; | 43 | }; |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | #endif | 46 | #endif |
