summaryrefslogtreecommitdiff
path: root/src/myriad.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-04-19 15:16:53 +0000
committerMike Buland <eichlan@xagasoft.com>2010-04-19 15:16:53 +0000
commit668737effd601778fba74edec14d22dd5b87457a (patch)
tree9ca6b88518cea29244dc92a219c20060cff8d593 /src/myriad.h
parentfc2943ed980306244749d8d13796eaff690917b6 (diff)
downloadlibbu++-668737effd601778fba74edec14d22dd5b87457a.tar.gz
libbu++-668737effd601778fba74edec14d22dd5b87457a.tar.bz2
libbu++-668737effd601778fba74edec14d22dd5b87457a.tar.xz
libbu++-668737effd601778fba74edec14d22dd5b87457a.zip
CacheStoreMyriad is written, it's pretty much a copy of CacheStoreNids since
Nids and Myriad pretty much share an API. However, there seems to be a bug in Myriad when a Myriad file is created and filled with data immediately, the header stream is mis-linking one of the blocks again.
Diffstat (limited to '')
-rw-r--r--src/myriad.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/myriad.h b/src/myriad.h
index 0344057..8f626a4 100644
--- a/src/myriad.h
+++ b/src/myriad.h
@@ -12,6 +12,7 @@
12#include "bu/bitstring.h" 12#include "bu/bitstring.h"
13#include "bu/exceptionbase.h" 13#include "bu/exceptionbase.h"
14#include "bu/array.h" 14#include "bu/array.h"
15#include "bu/hash.h"
15 16
16namespace Bu 17namespace Bu
17{ 18{
@@ -147,6 +148,7 @@ namespace Bu
147 148
148 Block *getBlock( int iBlock ); 149 Block *getBlock( int iBlock );
149 void releaseBlock( Block *pBlock ); 150 void releaseBlock( Block *pBlock );
151 void syncBlock( Block *pBlock );
150 152
151 private: 153 private:
152 Bu::Stream &sStore; 154 Bu::Stream &sStore;
@@ -155,6 +157,8 @@ namespace Bu
155 int iUsed; 157 int iUsed;
156 Bu::BitString bsBlockUsed; 158 Bu::BitString bsBlockUsed;
157 StreamArray aStreams; 159 StreamArray aStreams;
160 typedef Bu::Hash<int, Block *> BlockHash;
161 BlockHash hActiveBlocks;
158 }; 162 };
159}; 163};
160 164