diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-01-16 04:03:57 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-01-16 04:03:57 +0000 |
commit | 0a43e790cf9798948ab989abe88f890813c935df (patch) | |
tree | 536715caf638e1619f3fc73e8e2f8a5022c1f02b /src | |
parent | 0244488a3a6158659c4fcd1053f15d7f84fc06f8 (diff) | |
download | libbu++-0a43e790cf9798948ab989abe88f890813c935df.tar.gz libbu++-0a43e790cf9798948ab989abe88f890813c935df.tar.bz2 libbu++-0a43e790cf9798948ab989abe88f890813c935df.tar.xz libbu++-0a43e790cf9798948ab989abe88f890813c935df.zip |
They keys can be accessed now for all stores that support it, they pretty much
all should, but they don't really haaave to.
Diffstat (limited to '')
-rw-r--r-- | src/cache.h | 7 | ||||
-rw-r--r-- | src/cachestore.h | 3 | ||||
-rw-r--r-- | src/cachestorenids.cpp | 2 | ||||
-rw-r--r-- | src/cachestorenids.h | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/cache.h b/src/cache.h index f614aca..259278c 100644 --- a/src/cache.h +++ b/src/cache.h | |||
@@ -214,6 +214,11 @@ namespace Bu | |||
214 | hEnt.erase( cId ); | 214 | hEnt.erase( cId ); |
215 | } | 215 | } |
216 | 216 | ||
217 | Bu::List<keytype> getKeys() | ||
218 | { | ||
219 | return pStore->getKeys(); | ||
220 | } | ||
221 | |||
217 | private: | 222 | private: |
218 | void incRef( keytype cId ) | 223 | void incRef( keytype cId ) |
219 | { | 224 | { |
@@ -230,8 +235,8 @@ namespace Bu | |||
230 | 235 | ||
231 | private: | 236 | private: |
232 | CidHash hEnt; | 237 | CidHash hEnt; |
233 | Store *pStore; | ||
234 | Calc *pCalc; | 238 | Calc *pCalc; |
239 | Store *pStore; | ||
235 | }; | 240 | }; |
236 | }; | 241 | }; |
237 | 242 | ||
diff --git a/src/cachestore.h b/src/cachestore.h index 5b52359..97f02af 100644 --- a/src/cachestore.h +++ b/src/cachestore.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef BU_CACHE_STORE_H | 1 | #ifndef BU_CACHE_STORE_H |
2 | #define BU_CACHE_STORE_H | 2 | #define BU_CACHE_STORE_H |
3 | 3 | ||
4 | #include "bu/list.h" | ||
5 | |||
4 | namespace Bu | 6 | namespace Bu |
5 | { | 7 | { |
6 | /** | 8 | /** |
@@ -23,6 +25,7 @@ namespace Bu | |||
23 | virtual void unload( obtype *pObj, const keytype &key )=0; | 25 | virtual void unload( obtype *pObj, const keytype &key )=0; |
24 | virtual keytype create( obtype *pSrc )=0; | 26 | virtual keytype create( obtype *pSrc )=0; |
25 | virtual void destroy( obtype *pObj, const keytype &key )=0; | 27 | virtual void destroy( obtype *pObj, const keytype &key )=0; |
28 | virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); } | ||
26 | 29 | ||
27 | private: | 30 | private: |
28 | }; | 31 | }; |
diff --git a/src/cachestorenids.cpp b/src/cachestorenids.cpp index e69de29..2e50475 100644 --- a/src/cachestorenids.cpp +++ b/src/cachestorenids.cpp | |||
@@ -0,0 +1,2 @@ | |||
1 | #include "bu/cachestorenids.h" | ||
2 | |||
diff --git a/src/cachestorenids.h b/src/cachestorenids.h index f488117..0d8ff64 100644 --- a/src/cachestorenids.h +++ b/src/cachestorenids.h | |||
@@ -85,7 +85,7 @@ namespace Bu | |||
85 | delete pObj; | 85 | delete pObj; |
86 | } | 86 | } |
87 | 87 | ||
88 | Bu::List<keytype> getKeys() | 88 | virtual Bu::List<keytype> getKeys() |
89 | { | 89 | { |
90 | return hId.getKeys(); | 90 | return hId.getKeys(); |
91 | } | 91 | } |