aboutsummaryrefslogtreecommitdiff
path: root/src/cachestore.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/cachestore.h
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/cachestore.h')
-rw-r--r--src/cachestore.h46
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
13namespace 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