From 0a43e790cf9798948ab989abe88f890813c935df Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 16 Jan 2009 04:03:57 +0000 Subject: They keys can be accessed now for all stores that support it, they pretty much all should, but they don't really haaave to. --- src/cache.h | 7 ++++++- src/cachestore.h | 3 +++ src/cachestorenids.cpp | 2 ++ src/cachestorenids.h | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') 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 hEnt.erase( cId ); } + Bu::List getKeys() + { + return pStore->getKeys(); + } + private: void incRef( keytype cId ) { @@ -230,8 +235,8 @@ namespace Bu private: CidHash hEnt; - Store *pStore; Calc *pCalc; + Store *pStore; }; }; 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 @@ #ifndef BU_CACHE_STORE_H #define BU_CACHE_STORE_H +#include "bu/list.h" + namespace Bu { /** @@ -23,6 +25,7 @@ namespace Bu virtual void unload( obtype *pObj, const keytype &key )=0; virtual keytype create( obtype *pSrc )=0; virtual void destroy( obtype *pObj, const keytype &key )=0; + virtual Bu::List getKeys() { return Bu::List(); } private: }; 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 @@ +#include "bu/cachestorenids.h" + 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 delete pObj; } - Bu::List getKeys() + virtual Bu::List getKeys() { return hId.getKeys(); } -- cgit v1.2.3