summaryrefslogtreecommitdiff
path: root/src/unstable
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2014-03-05 02:01:04 +0000
committerMike Buland <eichlan@xagasoft.com>2014-03-05 02:01:04 +0000
commit19cad7be85d35ffff5b78aa43e45fe473ade60f3 (patch)
tree02ef8d6d009cdc0dda99cbd98f7e28bdf46a3214 /src/unstable
parent952cafc3b7225f2cef68b3945bfa94a2d7ea8466 (diff)
downloadlibbu++-19cad7be85d35ffff5b78aa43e45fe473ade60f3.tar.gz
libbu++-19cad7be85d35ffff5b78aa43e45fe473ade60f3.tar.bz2
libbu++-19cad7be85d35ffff5b78aa43e45fe473ade60f3.tar.xz
libbu++-19cad7be85d35ffff5b78aa43e45fe473ade60f3.zip
Added a method to null/clear a cache pointer, and one to see if it's set at all.
Diffstat (limited to 'src/unstable')
-rw-r--r--src/unstable/cachebase.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h
index 436a8ae..1584246 100644
--- a/src/unstable/cachebase.h
+++ b/src/unstable/cachebase.h
@@ -263,6 +263,21 @@ namespace Bu
263 CachePtrInterface<keytype, basetype>::releaseRef( pCache, pEnt, pData ); 263 CachePtrInterface<keytype, basetype>::releaseRef( pCache, pEnt, pData );
264 } 264 }
265 265
266 bool isSet() const
267 {
268 if( pCache )
269 return true;
270 return false;
271 }
272
273 void clear()
274 {
275 unbind();
276 pCache = NULL;
277 pEnt = NULL;
278 pData = NULL;
279 }
280
266 void lock() 281 void lock()
267 { 282 {
268 bind(); 283 bind();