aboutsummaryrefslogtreecommitdiff
path: root/src/unstable
diff options
context:
space:
mode:
Diffstat (limited to 'src/unstable')
-rw-r--r--src/unstable/cachebase.h14
1 files changed, 12 insertions, 2 deletions
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
121 void checkRef( CacheBase<keytype, basetype> *pCache, 121 void checkRef( CacheBase<keytype, basetype> *pCache,
122 const keytype &kId, 122 const keytype &kId,
123 CacheEntry<keytype, basetype> * &rpEnt, 123 CacheEntry<keytype, basetype> * &rpEnt,
124 obtype * &rpData ) 124 obtype * &rpData ) const
125 { 125 {
126 if( pCache == NULL ) 126 if( pCache == NULL )
127 throw Bu::ExceptionBase("Invalid cache pointer"); 127 throw Bu::ExceptionBase("Invalid cache pointer");
@@ -143,7 +143,7 @@ namespace Bu
143 template<typename obtype> 143 template<typename obtype>
144 void releaseRef( CacheBase<keytype, basetype> *pCache, 144 void releaseRef( CacheBase<keytype, basetype> *pCache,
145 CacheEntry<keytype, basetype> * &rpEnt, 145 CacheEntry<keytype, basetype> * &rpEnt,
146 obtype * &rpData ) 146 obtype * &rpData ) const
147 { 147 {
148 if( pCache == NULL ) 148 if( pCache == NULL )
149 return; 149 return;
@@ -288,6 +288,16 @@ namespace Bu
288 { 288 {
289 CachePtrInterface<keytype, basetype>::releaseRef( pCache, pEnt, pData ); 289 CachePtrInterface<keytype, basetype>::releaseRef( pCache, pEnt, pData );
290 } 290 }
291
292 void bind() const
293 {
294 CachePtrInterface<keytype, basetype>::checkRef( pCache, kId, pEnt, pData );
295 }
296
297 void unbind() const
298 {
299 CachePtrInterface<keytype, basetype>::releaseRef( pCache, pEnt, pData );
300 }
291 301
292 bool isSet() const 302 bool isSet() const
293 { 303 {