diff options
Diffstat (limited to 'src/cache.h')
-rw-r--r-- | src/cache.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h index 97ed140..c4e1b0b 100644 --- a/src/cache.h +++ b/src/cache.h | |||
@@ -100,6 +100,11 @@ namespace Bu | |||
100 | return pData != NULL; | 100 | return pData != NULL; |
101 | } | 101 | } |
102 | 102 | ||
103 | operator bool() const | ||
104 | { | ||
105 | return isBound() && isValid(); | ||
106 | } | ||
107 | |||
103 | const keytype &getKey() const | 108 | const keytype &getKey() const |
104 | { | 109 | { |
105 | return kId; | 110 | return kId; |
@@ -112,6 +117,17 @@ namespace Bu | |||
112 | pData = NULL; | 117 | pData = NULL; |
113 | } | 118 | } |
114 | 119 | ||
120 | void clear() | ||
121 | { | ||
122 | unbind(); | ||
123 | pCache = NULL; | ||
124 | } | ||
125 | |||
126 | void unset() | ||
127 | { | ||
128 | clear(); | ||
129 | } | ||
130 | |||
115 | Ptr &operator=( const Ptr &rRhs ) | 131 | Ptr &operator=( const Ptr &rRhs ) |
116 | { | 132 | { |
117 | if( pCache && pData ) | 133 | if( pCache && pData ) |