aboutsummaryrefslogtreecommitdiff
path: root/src/cachable.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-01 17:20:26 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-01 17:20:26 +0000
commit350b052cfd866e3b3c7c4626551b49f8b75e55a1 (patch)
treeb957f0dea70a7a2527ec78b32cdfc3e00712ff4d /src/cachable.h
parentc1229c50baa4816924e1914f3b4c78177749b73d (diff)
downloadlibbu++-350b052cfd866e3b3c7c4626551b49f8b75e55a1.tar.gz
libbu++-350b052cfd866e3b3c7c4626551b49f8b75e55a1.tar.bz2
libbu++-350b052cfd866e3b3c7c4626551b49f8b75e55a1.tar.xz
libbu++-350b052cfd866e3b3c7c4626551b49f8b75e55a1.zip
Woo! Very nearly there cache-wise, I'm about to change the name of the handler,
do a few more tests, and hopefully get something loading/saving.
Diffstat (limited to 'src/cachable.h')
-rw-r--r--src/cachable.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/cachable.h b/src/cachable.h
deleted file mode 100644
index a54c55b..0000000
--- a/src/cachable.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef BU_CACHABLE_H
2#define BU_CACHABLE_H
3
4namespace Bu
5{
6 class Cachable
7 {
8 public:
9 Cachable();
10 virtual ~Cachable();
11
12 virtual long getCacheId() const =0;
13 };
14
15 template<class obtype> long getCacheId( const obtype *o );
16 template<> long getCacheId<Cachable>( const Cachable *o );
17};
18
19#define DECL_CACHABLE( name ) \
20 namespace Bu { template<> long getCacheId<name>( const name *o ); }
21
22#define DEF_CACHABLE( name ) \
23 template<> long Bu::getCacheId<name>( const name *o ) \
24 { \
25 return getCacheId<Bu::Cachable>( (Bu::Cachable *)o ); \
26 }
27
28#endif