diff options
Diffstat (limited to 'src/cachestore.h')
-rw-r--r-- | src/cachestore.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/cachestore.h b/src/cachestore.h deleted file mode 100644 index d0d91a2..0000000 --- a/src/cachestore.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #ifndef BU_CACHE_STORE_H | ||
9 | #define BU_CACHE_STORE_H | ||
10 | |||
11 | #include "bu/list.h" | ||
12 | |||
13 | namespace Bu | ||
14 | { | ||
15 | /** | ||
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. | ||
18 | */ | ||
19 | template<class keytype, class obtype> | ||
20 | class CacheStore | ||
21 | { | ||
22 | public: | ||
23 | CacheStore() | ||
24 | { | ||
25 | } | ||
26 | |||
27 | virtual ~CacheStore() | ||
28 | { | ||
29 | } | ||
30 | |||
31 | virtual obtype *load( const keytype &key )=0; | ||
32 | virtual void unload( obtype *pObj, const keytype &key )=0; | ||
33 | virtual keytype create( obtype *pSrc )=0; | ||
34 | virtual void sync()=0; | ||
35 | virtual void sync( obtype *pObj, const keytype &key )=0; | ||
36 | virtual void destroy( obtype *pObj, const keytype &key )=0; | ||
37 | virtual void destroy( const keytype &key )=0; | ||
38 | virtual bool has( const keytype &key )=0; | ||
39 | virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); } | ||
40 | virtual int getSize() { return -1; } | ||
41 | |||
42 | private: | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | #endif | ||