diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-10-09 20:20:34 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-10-09 20:20:34 +0000 |
commit | 4808617ef54d40efcf1a3ed30525898defb74e10 (patch) | |
tree | e16763eb646fdf3dea7c32a8d57c147356be9299 /src/cachable.h | |
parent | fecbea5970bb89c15b35f5df5b09914b4c91efe0 (diff) | |
download | libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.gz libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.bz2 libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.xz libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.zip |
More cache development. I'm going to have to switch from template functions to
functors. I like template functions a little more, but functors can be at
least as fast. It won't be much of a change.
Diffstat (limited to 'src/cachable.h')
-rw-r--r-- | src/cachable.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cachable.h b/src/cachable.h new file mode 100644 index 0000000..529da6f --- /dev/null +++ b/src/cachable.h | |||
@@ -0,0 +1,19 @@ | |||
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 | #endif | ||