diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-11-10 23:10:38 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-11-10 23:10:38 +0000 |
commit | 4bbeb6208ac33f71a09701cc5251f0412977946e (patch) | |
tree | 038a71056f91d7ce3b26f90fde3519d404e7cb63 /src/cachable.h | |
parent | 61edfe804eb1a1dbf96fcdf2f1b700ed1cfa7ff9 (diff) | |
download | libbu++-4bbeb6208ac33f71a09701cc5251f0412977946e.tar.gz libbu++-4bbeb6208ac33f71a09701cc5251f0412977946e.tar.bz2 libbu++-4bbeb6208ac33f71a09701cc5251f0412977946e.tar.xz libbu++-4bbeb6208ac33f71a09701cc5251f0412977946e.zip |
Ok, the cache-id officiation is being delegated to the CacheHandlers, this is
just fine, since they can do it any way they want. The Congo CacheHandlers
will all have to be specialized versions of the generic ones, but they'll use
all the general functionality, just make up IDs differently. It'll rock.
Diffstat (limited to '')
-rw-r--r-- | src/cachable.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cachable.h b/src/cachable.h index 529da6f..a54c55b 100644 --- a/src/cachable.h +++ b/src/cachable.h | |||
@@ -16,4 +16,13 @@ namespace Bu | |||
16 | template<> long getCacheId<Cachable>( const Cachable *o ); | 16 | template<> long getCacheId<Cachable>( const Cachable *o ); |
17 | }; | 17 | }; |
18 | 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 | |||
19 | #endif | 28 | #endif |