aboutsummaryrefslogtreecommitdiff
path: root/src/cachestorenids.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cachestorenids.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/cachestorenids.h b/src/cachestorenids.h
index 40213cd..c6a00ce 100644
--- a/src/cachestorenids.h
+++ b/src/cachestorenids.h
@@ -97,6 +97,22 @@ namespace Bu
97 return key; 97 return key;
98 } 98 }
99 99
100 virtual void sync()
101 {
102 NidsStream ns = nStore.openStream( 0 );
103 Bu::Archive ar( ns, Bu::Archive::save );
104 ar << hId;
105
106 nStore.sync();
107 }
108
109 virtual void sync( obtype *pSrc, const keytype &key )
110 {
111 int iStream = hId.get( key );
112 NidsStream ns = nStore.openStream( iStream );
113 __cacheStoreNidsStore<obtype, keytype>( ns, *pSrc, key );
114 }
115
100 virtual void destroy( obtype *pObj, const keytype &key ) 116 virtual void destroy( obtype *pObj, const keytype &key )
101 { 117 {
102 int iStream = hId.get( key ); 118 int iStream = hId.get( key );
@@ -105,6 +121,11 @@ namespace Bu
105 delete pObj; 121 delete pObj;
106 } 122 }
107 123
124 virtual bool has( const keytype &key )
125 {
126 return hId.has( key );
127 }
128
108 virtual Bu::List<keytype> getKeys() 129 virtual Bu::List<keytype> getKeys()
109 { 130 {
110 return hId.getKeys(); 131 return hId.getKeys();