From 4bbeb6208ac33f71a09701cc5251f0412977946e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 10 Nov 2008 23:10:38 +0000 Subject: 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. --- src/cachable.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cachable.h') 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 template<> long getCacheId( const Cachable *o ); }; +#define DECL_CACHABLE( name ) \ + namespace Bu { template<> long getCacheId( const name *o ); } + +#define DEF_CACHABLE( name ) \ + template<> long Bu::getCacheId( const name *o ) \ + { \ + return getCacheId( (Bu::Cachable *)o ); \ + } + #endif -- cgit v1.2.3