From 469bbcf0701e1eb8a6670c23145b0da87357e178 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 25 Mar 2012 20:00:08 +0000 Subject: Code is all reorganized. We're about ready to release. I should write up a little explenation of the arrangement. --- src/experimental/cachestore.h | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/experimental/cachestore.h (limited to 'src/experimental/cachestore.h') diff --git a/src/experimental/cachestore.h b/src/experimental/cachestore.h new file mode 100644 index 0000000..d0d91a2 --- /dev/null +++ b/src/experimental/cachestore.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2007-2011 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ + +#ifndef BU_CACHE_STORE_H +#define BU_CACHE_STORE_H + +#include "bu/list.h" + +namespace Bu +{ + /** + * Handles I/O for data in the cache. This also assigns ID's to the newly + * created objects that are requested through this system. + */ + template + class CacheStore + { + public: + CacheStore() + { + } + + virtual ~CacheStore() + { + } + + virtual obtype *load( const keytype &key )=0; + virtual void unload( obtype *pObj, const keytype &key )=0; + virtual keytype create( obtype *pSrc )=0; + virtual void sync()=0; + virtual void sync( obtype *pObj, const keytype &key )=0; + virtual void destroy( obtype *pObj, const keytype &key )=0; + virtual void destroy( const keytype &key )=0; + virtual bool has( const keytype &key )=0; + virtual Bu::List getKeys() { return Bu::List(); } + virtual int getSize() { return -1; } + + private: + }; +}; + +#endif -- cgit v1.2.3