summaryrefslogtreecommitdiff
path: root/src/cptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cptr.h')
-rw-r--r--src/cptr.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cptr.h b/src/cptr.h
index 8f35a03..97f5e17 100644
--- a/src/cptr.h
+++ b/src/cptr.h
@@ -15,9 +15,11 @@ namespace Bu
15 { 15 {
16 friend class Bu::Cache<obtype, keytype>; 16 friend class Bu::Cache<obtype, keytype>;
17 private: 17 private:
18 CPtr( Cache<obtype, keytype> &rCache, obtype *pData ) : 18 CPtr( Cache<obtype, keytype> &rCache, obtype *pData,
19 const keytype &kId ) :
19 rCache( rCache ), 20 rCache( rCache ),
20 pData( pData ) 21 pData( pData ),
22 kId( kId )
21 { 23 {
22 rCache.incRef( kId ); 24 rCache.incRef( kId );
23 } 25 }
@@ -38,6 +40,11 @@ namespace Bu
38 return pData; 40 return pData;
39 } 41 }
40 42
43 const keytype &getKey()
44 {
45 return kId;
46 }
47
41 private: 48 private:
42 Bu::Cache<obtype, keytype> &rCache; 49 Bu::Cache<obtype, keytype> &rCache;
43 obtype *pData; 50 obtype *pData;