aboutsummaryrefslogtreecommitdiff
path: root/src/cachestorenids.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-01-27 16:54:55 +0000
committerMike Buland <eichlan@xagasoft.com>2009-01-27 16:54:55 +0000
commit00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6 (patch)
treef5e127d2e169a0eb93c66d5c76852303d4a10f0c /src/cachestorenids.h
parent9098237f5bb16b204a5ea999b702e5eb170f68ac (diff)
downloadlibbu++-00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6.tar.gz
libbu++-00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6.tar.bz2
libbu++-00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6.tar.xz
libbu++-00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6.zip
Corrected the Bu::File::canRead() and Bu::File::canWrite() functions, they work
now. It helps to read the system docs. Anyway, nids is all fixed up, it seems to work great now, and I guess I got all the corner cases we'll hit for a while, fishtrax really did a number on them :) I also cleaned up all the debugging output, now you can see your program run instead of libbu++ internals. There could still be a good amount of improvement made in nids, it really shouldn't re-write whole blocks every time you write to a stream, but that will be an easy change down the line that won't effect any of the existing code.
Diffstat (limited to 'src/cachestorenids.h')
-rw-r--r--src/cachestorenids.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/cachestorenids.h b/src/cachestorenids.h
index bd0fcc7..9288008 100644
--- a/src/cachestorenids.h
+++ b/src/cachestorenids.h
@@ -48,12 +48,6 @@ namespace Bu
48 NidsStream ns = nStore.openStream( 0 ); 48 NidsStream ns = nStore.openStream( 0 );
49 Bu::Archive ar( ns, Bu::Archive::save ); 49 Bu::Archive ar( ns, Bu::Archive::save );
50 ar << hId; 50 ar << hId;
51
52 Bu::FString sName;
53 sName.format("hash-%d.%02d", time( NULL ), iCnt++ );
54 Bu::File sTmp( sName, Bu::File::Write|Bu::File::Create );
55 Bu::Archive artmp( sTmp, Bu::Archive::save );
56 artmp << hId;
57 } 51 }
58 52
59 virtual obtype *load( const keytype &key ) 53 virtual obtype *load( const keytype &key )
@@ -80,7 +74,6 @@ namespace Bu
80 keytype key = __cacheGetKey<obtype,keytype>( pSrc ); 74 keytype key = __cacheGetKey<obtype,keytype>( pSrc );
81 int iStream = nStore.createStream(); 75 int iStream = nStore.createStream();
82 hId.insert( key, iStream ); 76 hId.insert( key, iStream );
83 printf("Creating stream: %d\n", iStream );
84 NidsStream ns = nStore.openStream( iStream ); 77 NidsStream ns = nStore.openStream( iStream );
85 Bu::Archive ar( ns, Bu::Archive::save ); 78 Bu::Archive ar( ns, Bu::Archive::save );
86 obtype *pOb = new obtype(); 79 obtype *pOb = new obtype();