diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
commit | ec05778d5718a7912e506764d443a78d6a6179e3 (patch) | |
tree | 78a9a01532180030c095acefc45763f07c14edb8 /src/stable/nullstream.cpp | |
parent | b20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff) | |
download | libbu++-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.cpp | 44 |
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 | ||
10 | Bu::NullStream::NullStream() : | 10 | Bu::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 | ||
20 | void Bu::NullStream::close() | 20 | void Bu::NullStream::close() |
21 | { | 21 | { |
22 | sRead = sWrote = 0; | 22 | sRead = sWrote = 0; |
23 | } | 23 | } |
24 | 24 | ||
25 | Bu::size Bu::NullStream::read( void *pBuf, Bu::size nBytes ) | 25 | Bu::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 | ||
32 | Bu::String Bu::NullStream::readLine() | 32 | Bu::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 | ||
38 | Bu::size Bu::NullStream::write( const void *, Bu::size nBytes ) | 38 | Bu::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 | ||
44 | Bu::size Bu::NullStream::tell() | 44 | Bu::size Bu::NullStream::tell() |
45 | { | 45 | { |
46 | return sRead + sWrote; | 46 | return sRead + sWrote; |
47 | } | 47 | } |
48 | 48 | ||
49 | void Bu::NullStream::seek( Bu::size ) | 49 | void Bu::NullStream::seek( Bu::size ) |
@@ -60,12 +60,12 @@ void Bu::NullStream::setPosEnd( Bu::size ) | |||
60 | 60 | ||
61 | bool Bu::NullStream::isEos() | 61 | bool Bu::NullStream::isEos() |
62 | { | 62 | { |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
65 | 65 | ||
66 | bool Bu::NullStream::isOpen() | 66 | bool Bu::NullStream::isOpen() |
67 | { | 67 | { |
68 | return true; | 68 | return true; |
69 | } | 69 | } |
70 | 70 | ||
71 | void Bu::NullStream::flush() | 71 | void Bu::NullStream::flush() |
@@ -74,32 +74,32 @@ void Bu::NullStream::flush() | |||
74 | 74 | ||
75 | bool Bu::NullStream::canRead() | 75 | bool Bu::NullStream::canRead() |
76 | { | 76 | { |
77 | return true; | 77 | return true; |
78 | } | 78 | } |
79 | 79 | ||
80 | bool Bu::NullStream::canWrite() | 80 | bool Bu::NullStream::canWrite() |
81 | { | 81 | { |
82 | return true; | 82 | return true; |
83 | } | 83 | } |
84 | 84 | ||
85 | bool Bu::NullStream::isReadable() | 85 | bool Bu::NullStream::isReadable() |
86 | { | 86 | { |
87 | return true; | 87 | return true; |
88 | } | 88 | } |
89 | 89 | ||
90 | bool Bu::NullStream::isWritable() | 90 | bool Bu::NullStream::isWritable() |
91 | { | 91 | { |
92 | return true; | 92 | return true; |
93 | } | 93 | } |
94 | 94 | ||
95 | bool Bu::NullStream::isSeekable() | 95 | bool Bu::NullStream::isSeekable() |
96 | { | 96 | { |
97 | return false; | 97 | return false; |
98 | } | 98 | } |
99 | 99 | ||
100 | bool Bu::NullStream::isBlocking() | 100 | bool Bu::NullStream::isBlocking() |
101 | { | 101 | { |
102 | return true; | 102 | return true; |
103 | } | 103 | } |
104 | 104 | ||
105 | void Bu::NullStream::setBlocking( bool ) | 105 | void Bu::NullStream::setBlocking( bool ) |
@@ -112,16 +112,16 @@ void Bu::NullStream::setSize( Bu::size ) | |||
112 | 112 | ||
113 | Bu::size Bu::NullStream::getSize() const | 113 | Bu::size Bu::NullStream::getSize() const |
114 | { | 114 | { |
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | Bu::size Bu::NullStream::getBlockSize() const | 118 | Bu::size Bu::NullStream::getBlockSize() const |
119 | { | 119 | { |
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | 122 | ||
123 | Bu::String Bu::NullStream::getLocation() const | 123 | Bu::String Bu::NullStream::getLocation() const |
124 | { | 124 | { |
125 | return ""; | 125 | return ""; |
126 | } | 126 | } |
127 | 127 | ||