diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 05:30:43 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 05:30:43 +0000 |
commit | 7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2 (patch) | |
tree | e2d4bfccd81070adf7294ee54db2399df0c7171f /src/nullstream.cpp | |
parent | f5aca1a1b402bd7ebc944dc6e6fe65828d863365 (diff) | |
download | libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.gz libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.bz2 libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.xz libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.zip |
Wow, got the Stream changes propegated, all tests build with string instead of
fstring, and updated the copyright notice to extend to 2011
Diffstat (limited to '')
-rw-r--r-- | src/nullstream.cpp | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/src/nullstream.cpp b/src/nullstream.cpp index 6f792e3..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 | ||
3 | Bu::NullStream::NullStream() : | 10 | Bu::NullStream::NullStream() : |
@@ -15,7 +22,7 @@ void Bu::NullStream::close() | |||
15 | sRead = sWrote = 0; | 22 | sRead = sWrote = 0; |
16 | } | 23 | } |
17 | 24 | ||
18 | size_t Bu::NullStream::read( void *pBuf, size_t nBytes ) | 25 | Bu::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; |
@@ -28,26 +35,26 @@ Bu::String Bu::NullStream::readLine() | |||
28 | return Bu::String("\0", 1 ); | 35 | return Bu::String("\0", 1 ); |
29 | } | 36 | } |
30 | 37 | ||
31 | size_t Bu::NullStream::write( const void *, size_t nBytes ) | 38 | Bu::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 | ||
37 | long Bu::NullStream::tell() | 44 | Bu::size Bu::NullStream::tell() |
38 | { | 45 | { |
39 | return sRead + sWrote; | 46 | return sRead + sWrote; |
40 | } | 47 | } |
41 | 48 | ||
42 | void Bu::NullStream::seek( long ) | 49 | void Bu::NullStream::seek( Bu::size ) |
43 | { | 50 | { |
44 | } | 51 | } |
45 | 52 | ||
46 | void Bu::NullStream::setPos( long ) | 53 | void Bu::NullStream::setPos( Bu::size ) |
47 | { | 54 | { |
48 | } | 55 | } |
49 | 56 | ||
50 | void Bu::NullStream::setPosEnd( long ) | 57 | void 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 | ||
102 | void Bu::NullStream::setSize( long ) | 109 | void Bu::NullStream::setSize( Bu::size ) |
110 | { | ||
111 | } | ||
112 | |||
113 | Bu::size Bu::NullStream::getSize() const | ||
114 | { | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | Bu::size Bu::NullStream::getBlockSize() const | ||
119 | { | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | Bu::String Bu::NullStream::getLocation() const | ||
103 | { | 124 | { |
125 | return ""; | ||
104 | } | 126 | } |
105 | 127 | ||