From b5e1c2fba2b372aa19e1c857c176a175f30241d8 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 14 Jul 2015 05:48:37 +0000 Subject: constant cache pointers can now be bound and unbound. It may seem odd, but it's important, they are references to constant data, weather they should be able to become bound still. --- src/unstable/cachebase.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/unstable') diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h index 3db257b..1f78360 100644 --- a/src/unstable/cachebase.h +++ b/src/unstable/cachebase.h @@ -121,7 +121,7 @@ namespace Bu void checkRef( CacheBase *pCache, const keytype &kId, CacheEntry * &rpEnt, - obtype * &rpData ) + obtype * &rpData ) const { if( pCache == NULL ) throw Bu::ExceptionBase("Invalid cache pointer"); @@ -143,7 +143,7 @@ namespace Bu template void releaseRef( CacheBase *pCache, CacheEntry * &rpEnt, - obtype * &rpData ) + obtype * &rpData ) const { if( pCache == NULL ) return; @@ -288,6 +288,16 @@ namespace Bu { CachePtrInterface::releaseRef( pCache, pEnt, pData ); } + + void bind() const + { + CachePtrInterface::checkRef( pCache, kId, pEnt, pData ); + } + + void unbind() const + { + CachePtrInterface::releaseRef( pCache, pEnt, pData ); + } bool isSet() const { -- cgit v1.2.3