From 5230927c4f087cf2dcaac4fb9ed133c1ff3e2269 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 15 Sep 2008 22:32:19 +0000 Subject: Wooo! It compiles again! The nids streams are almost ready. --- src/nidsstream.cpp | 6 ++++-- src/nidsstream.h | 3 ++- src/tests/nids.cpp | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nidsstream.cpp b/src/nidsstream.cpp index e3bd731..2f24d69 100644 --- a/src/nidsstream.cpp +++ b/src/nidsstream.cpp @@ -1,12 +1,14 @@ #include "bu/nidsstream.h" Bu::NidsStream::NidsStream( Nids &rNids ) : - rNids( rNids ) + rNids( rNids ), + iPos( 0 ) { } Bu::NidsStream::NidsStream( const Bu::NidsStream &rSrc ) : - rNids( rSrc.rNids ) + rNids( rSrc.rNids ), + iPos( 0 ) { } diff --git a/src/nidsstream.h b/src/nidsstream.h index 8021dee..f64fca4 100644 --- a/src/nidsstream.h +++ b/src/nidsstream.h @@ -14,9 +14,9 @@ namespace Bu * These can only be created by the Nids class. */ NidsStream( Nids &rNids ); - NidsStream( const NidsStream &rSrc ); public: + NidsStream( const NidsStream &rSrc ); virtual ~NidsStream(); virtual void close(); @@ -42,6 +42,7 @@ namespace Bu Nids &rNids; typedef struct Bu::Hash BlockHash; BlockHash hBlock; + long iPos; }; }; diff --git a/src/tests/nids.cpp b/src/tests/nids.cpp index 1197ac1..18f66a6 100644 --- a/src/tests/nids.cpp +++ b/src/tests/nids.cpp @@ -1,5 +1,6 @@ #include "bu/file.h" #include "bu/nids.h" +#include "bu/nidsstream.h" int main( int argc, char *argv[] ) { @@ -15,5 +16,10 @@ int main( int argc, char *argv[] ) n.initialize( 1024, 5 ); Bu::NidsStream s = n.openStream( n.createStream() ); + + Bu::FString sBuf("Hey there, man...uh...how's it going?"); + s.write( sBuf ); + + return 0; } -- cgit v1.2.3