diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-11-19 09:39:24 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-11-19 09:39:24 +0000 |
commit | b5b68088f28b2593bfbf910a46fd52775007e8b3 (patch) | |
tree | 254a04b68ee1a8f8e2070fe10162d6ad0cea1620 /src/stdstream.h | |
parent | 305d608fe508b8e2c31df9282cc6f987260a76b1 (diff) | |
download | libbu++-b5b68088f28b2593bfbf910a46fd52775007e8b3.tar.gz libbu++-b5b68088f28b2593bfbf910a46fd52775007e8b3.tar.bz2 libbu++-b5b68088f28b2593bfbf910a46fd52775007e8b3.tar.xz libbu++-b5b68088f28b2593bfbf910a46fd52775007e8b3.zip |
Added the Bu::StdStream Stream class, it's just a wrapper for writing to,
reading from standard output/input.
Diffstat (limited to '')
-rw-r--r-- | src/stdstream.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/stdstream.h b/src/stdstream.h new file mode 100644 index 0000000..ccfb28a --- /dev/null +++ b/src/stdstream.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 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 | |||
8 | #ifndef BU_STD_STREAM_H | ||
9 | #define BU_STD_STREAM_H | ||
10 | |||
11 | #include <stdint.h> | ||
12 | #include <stdio.h> | ||
13 | #include "stream.h" | ||
14 | |||
15 | namespace Bu | ||
16 | { | ||
17 | class StdStream : public Stream | ||
18 | { | ||
19 | public: | ||
20 | StdStream(); | ||
21 | virtual ~StdStream(); | ||
22 | |||
23 | virtual void close(); | ||
24 | virtual size_t read( void *pBuf, size_t nBytes ); | ||
25 | virtual size_t write( const void *pBuf, size_t nBytes ); | ||
26 | virtual long tell(); | ||
27 | virtual void seek( long offset ); | ||
28 | virtual void setPos( long pos ); | ||
29 | virtual void setPosEnd( long pos ); | ||
30 | virtual bool isEOS(); | ||
31 | virtual bool isOpen(); | ||
32 | virtual void flush(); | ||
33 | virtual bool canRead(); | ||
34 | virtual bool canWrite(); | ||
35 | virtual bool isReadable(); | ||
36 | virtual bool isWritable(); | ||
37 | virtual bool isSeekable(); | ||
38 | virtual bool isBlocking(); | ||
39 | virtual void setBlocking( bool bBlocking=true ); | ||
40 | }; | ||
41 | } | ||
42 | |||
43 | #endif | ||