diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-12-01 17:20:26 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-12-01 17:20:26 +0000 |
commit | 350b052cfd866e3b3c7c4626551b49f8b75e55a1 (patch) | |
tree | b957f0dea70a7a2527ec78b32cdfc3e00712ff4d /src/cachable.h | |
parent | c1229c50baa4816924e1914f3b4c78177749b73d (diff) | |
download | libbu++-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.h | 28 |
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 | |||
4 | namespace 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 | ||