aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nidsstream.cpp6
-rw-r--r--src/nidsstream.h3
-rw-r--r--src/tests/nids.cpp6
3 files changed, 12 insertions, 3 deletions
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 @@
1#include "bu/nidsstream.h" 1#include "bu/nidsstream.h"
2 2
3Bu::NidsStream::NidsStream( Nids &rNids ) : 3Bu::NidsStream::NidsStream( Nids &rNids ) :
4 rNids( rNids ) 4 rNids( rNids ),
5 iPos( 0 )
5{ 6{
6} 7}
7 8
8Bu::NidsStream::NidsStream( const Bu::NidsStream &rSrc ) : 9Bu::NidsStream::NidsStream( const Bu::NidsStream &rSrc ) :
9 rNids( rSrc.rNids ) 10 rNids( rSrc.rNids ),
11 iPos( 0 )
10{ 12{
11 13
12} 14}
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
14 * These can only be created by the Nids class. 14 * These can only be created by the Nids class.
15 */ 15 */
16 NidsStream( Nids &rNids ); 16 NidsStream( Nids &rNids );
17 NidsStream( const NidsStream &rSrc );
18 17
19 public: 18 public:
19 NidsStream( const NidsStream &rSrc );
20 virtual ~NidsStream(); 20 virtual ~NidsStream();
21 21
22 virtual void close(); 22 virtual void close();
@@ -42,6 +42,7 @@ namespace Bu
42 Nids &rNids; 42 Nids &rNids;
43 typedef struct Bu::Hash<int, struct Nids::Block *> BlockHash; 43 typedef struct Bu::Hash<int, struct Nids::Block *> BlockHash;
44 BlockHash hBlock; 44 BlockHash hBlock;
45 long iPos;
45 }; 46 };
46}; 47};
47 48
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 @@
1#include "bu/file.h" 1#include "bu/file.h"
2#include "bu/nids.h" 2#include "bu/nids.h"
3#include "bu/nidsstream.h"
3 4
4int main( int argc, char *argv[] ) 5int main( int argc, char *argv[] )
5{ 6{
@@ -15,5 +16,10 @@ int main( int argc, char *argv[] )
15 n.initialize( 1024, 5 ); 16 n.initialize( 1024, 5 );
16 17
17 Bu::NidsStream s = n.openStream( n.createStream() ); 18 Bu::NidsStream s = n.openStream( n.createStream() );
19
20 Bu::FString sBuf("Hey there, man...uh...how's it going?");
21 s.write( sBuf );
22
23 return 0;
18} 24}
19 25