aboutsummaryrefslogtreecommitdiff
path: root/src/stable/nullstream.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/stable/nullstream.cpp
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/stable/nullstream.cpp')
-rw-r--r--src/stable/nullstream.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/stable/nullstream.cpp b/src/stable/nullstream.cpp
index 0dcede2..5f568b9 100644
--- a/src/stable/nullstream.cpp
+++ b/src/stable/nullstream.cpp
@@ -8,8 +8,8 @@
8#include "bu/nullstream.h" 8#include "bu/nullstream.h"
9 9
10Bu::NullStream::NullStream() : 10Bu::NullStream::NullStream() :
11 sRead( 0 ), 11 sRead( 0 ),
12 sWrote( 0 ) 12 sWrote( 0 )
13{ 13{
14} 14}
15 15
@@ -19,31 +19,31 @@ Bu::NullStream::~NullStream()
19 19
20void Bu::NullStream::close() 20void Bu::NullStream::close()
21{ 21{
22 sRead = sWrote = 0; 22 sRead = sWrote = 0;
23} 23}
24 24
25Bu::size Bu::NullStream::read( void *pBuf, Bu::size nBytes ) 25Bu::size Bu::NullStream::read( void *pBuf, Bu::size nBytes )
26{ 26{
27 memset( pBuf, 0, nBytes ); 27 memset( pBuf, 0, nBytes );
28 sRead += nBytes; 28 sRead += nBytes;
29 return nBytes; 29 return nBytes;
30} 30}
31 31
32Bu::String Bu::NullStream::readLine() 32Bu::String Bu::NullStream::readLine()
33{ 33{
34 sRead++; 34 sRead++;
35 return Bu::String("\0", 1 ); 35 return Bu::String("\0", 1 );
36} 36}
37 37
38Bu::size Bu::NullStream::write( const void *, Bu::size nBytes ) 38Bu::size Bu::NullStream::write( const void *, Bu::size nBytes )
39{ 39{
40 sWrote += nBytes; 40 sWrote += nBytes;
41 return nBytes; 41 return nBytes;
42} 42}
43 43
44Bu::size Bu::NullStream::tell() 44Bu::size Bu::NullStream::tell()
45{ 45{
46 return sRead + sWrote; 46 return sRead + sWrote;
47} 47}
48 48
49void Bu::NullStream::seek( Bu::size ) 49void Bu::NullStream::seek( Bu::size )
@@ -60,12 +60,12 @@ void Bu::NullStream::setPosEnd( Bu::size )
60 60
61bool Bu::NullStream::isEos() 61bool Bu::NullStream::isEos()
62{ 62{
63 return false; 63 return false;
64} 64}
65 65
66bool Bu::NullStream::isOpen() 66bool Bu::NullStream::isOpen()
67{ 67{
68 return true; 68 return true;
69} 69}
70 70
71void Bu::NullStream::flush() 71void Bu::NullStream::flush()
@@ -74,32 +74,32 @@ void Bu::NullStream::flush()
74 74
75bool Bu::NullStream::canRead() 75bool Bu::NullStream::canRead()
76{ 76{
77 return true; 77 return true;
78} 78}
79 79
80bool Bu::NullStream::canWrite() 80bool Bu::NullStream::canWrite()
81{ 81{
82 return true; 82 return true;
83} 83}
84 84
85bool Bu::NullStream::isReadable() 85bool Bu::NullStream::isReadable()
86{ 86{
87 return true; 87 return true;
88} 88}
89 89
90bool Bu::NullStream::isWritable() 90bool Bu::NullStream::isWritable()
91{ 91{
92 return true; 92 return true;
93} 93}
94 94
95bool Bu::NullStream::isSeekable() 95bool Bu::NullStream::isSeekable()
96{ 96{
97 return false; 97 return false;
98} 98}
99 99
100bool Bu::NullStream::isBlocking() 100bool Bu::NullStream::isBlocking()
101{ 101{
102 return true; 102 return true;
103} 103}
104 104
105void Bu::NullStream::setBlocking( bool ) 105void Bu::NullStream::setBlocking( bool )
@@ -112,16 +112,16 @@ void Bu::NullStream::setSize( Bu::size )
112 112
113Bu::size Bu::NullStream::getSize() const 113Bu::size Bu::NullStream::getSize() const
114{ 114{
115 return 0; 115 return 0;
116} 116}
117 117
118Bu::size Bu::NullStream::getBlockSize() const 118Bu::size Bu::NullStream::getBlockSize() const
119{ 119{
120 return 0; 120 return 0;
121} 121}
122 122
123Bu::String Bu::NullStream::getLocation() const 123Bu::String Bu::NullStream::getLocation() const
124{ 124{
125 return ""; 125 return "";
126} 126}
127 127