From e7f4a92bb81c5fabcb12372a180016b996f2c988 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 25 Jan 2010 16:56:19 +0000 Subject: I had thought that I had done this ages ago. __cacheGetKey now has a general template definition that just calls getKey() in the object, if the object doesn't support a getKey() method, then you can write your own, but now you don't have to. --- src/cache.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cache.h b/src/cache.h index c738d28..f10233b 100644 --- a/src/cache.h +++ b/src/cache.h @@ -20,6 +20,11 @@ namespace Bu { // template // keytype __cacheGetKey( obtype *&pObj ); + template + keytype __cacheGetKey( const obtype *pObj ) + { + return pObj->getKey(); + } template class Cache -- cgit v1.2.3