diff options
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 | ||
