summaryrefslogtreecommitdiff
path: root/src/nullstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nullstream.cpp')
-rw-r--r--src/nullstream.cpp40
1 files changed, 31 insertions, 9 deletions
diff --git a/src/nullstream.cpp b/src/nullstream.cpp
index 40c636c..9552cc5 100644
--- a/src/nullstream.cpp
+++ b/src/nullstream.cpp
@@ -1,3 +1,10 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
1#include "bu/nullstream.h" 8#include "bu/nullstream.h"
2 9
3Bu::NullStream::NullStream() : 10Bu::NullStream::NullStream() :
@@ -15,39 +22,39 @@ void Bu::NullStream::close()
15 sRead = sWrote = 0; 22 sRead = sWrote = 0;
16} 23}
17 24
18size_t Bu::NullStream::read( void *pBuf, size_t nBytes ) 25Bu::size Bu::NullStream::read( void *pBuf, Bu::size nBytes )
19{ 26{
20 memset( pBuf, 0, nBytes ); 27 memset( pBuf, 0, nBytes );
21 sRead += nBytes; 28 sRead += nBytes;
22 return nBytes; 29 return nBytes;
23} 30}
24 31
25Bu::FString Bu::NullStream::readLine() 32Bu::String Bu::NullStream::readLine()
26{ 33{
27 sRead++; 34 sRead++;
28 return Bu::FString("\0", 1 ); 35 return Bu::String("\0", 1 );
29} 36}
30 37
31size_t Bu::NullStream::write( const void *, size_t nBytes ) 38Bu::size Bu::NullStream::write( const void *, Bu::size nBytes )
32{ 39{
33 sWrote += nBytes; 40 sWrote += nBytes;
34 return nBytes; 41 return nBytes;
35} 42}
36 43
37long Bu::NullStream::tell() 44Bu::size Bu::NullStream::tell()
38{ 45{
39 return sRead + sWrote; 46 return sRead + sWrote;
40} 47}
41 48
42void Bu::NullStream::seek( long ) 49void Bu::NullStream::seek( Bu::size )
43{ 50{
44} 51}
45 52
46void Bu::NullStream::setPos( long ) 53void Bu::NullStream::setPos( Bu::size )
47{ 54{
48} 55}
49 56
50void Bu::NullStream::setPosEnd( long ) 57void Bu::NullStream::setPosEnd( Bu::size )
51{ 58{
52} 59}
53 60
@@ -99,7 +106,22 @@ void Bu::NullStream::setBlocking( bool )
99{ 106{
100} 107}
101 108
102void Bu::NullStream::setSize( long ) 109void Bu::NullStream::setSize( Bu::size )
110{
111}
112
113Bu::size Bu::NullStream::getSize() const
114{
115 return 0;
116}
117
118Bu::size Bu::NullStream::getBlockSize() const
119{
120 return 0;
121}
122
123Bu::String Bu::NullStream::getLocation() const
103{ 124{
125 return "";
104} 126}
105 127