diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
commit | 469bbcf0701e1eb8a6670c23145b0da87357e178 (patch) | |
tree | b5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/stable/stdstream.cpp | |
parent | ee1b79396076edc4e30aefb285fada03bb45e80d (diff) | |
download | libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2 libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip |
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/stable/stdstream.cpp')
-rw-r--r-- | src/stable/stdstream.cpp | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/src/stable/stdstream.cpp b/src/stable/stdstream.cpp new file mode 100644 index 0000000..b1d5d61 --- /dev/null +++ b/src/stable/stdstream.cpp | |||
@@ -0,0 +1,117 @@ | |||
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 | |||
8 | #include <stdio.h> | ||
9 | #include "bu/stdstream.h" | ||
10 | |||
11 | Bu::StdStream::StdStream() | ||
12 | { | ||
13 | } | ||
14 | |||
15 | Bu::StdStream::~StdStream() | ||
16 | { | ||
17 | } | ||
18 | |||
19 | void Bu::StdStream::close() | ||
20 | { | ||
21 | } | ||
22 | |||
23 | Bu::size Bu::StdStream::read( void *pBuf, Bu::size nBytes ) | ||
24 | { | ||
25 | return fread( pBuf, 1, nBytes, stdin ); | ||
26 | } | ||
27 | |||
28 | Bu::size Bu::StdStream::write( const void *pBuf, Bu::size nBytes ) | ||
29 | { | ||
30 | return fwrite( pBuf, 1, nBytes, stdout ); | ||
31 | } | ||
32 | |||
33 | Bu::size Bu::StdStream::tell() | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | void Bu::StdStream::seek( Bu::size ) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | void Bu::StdStream::setPos( Bu::size ) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | void Bu::StdStream::setPosEnd( Bu::size ) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | bool Bu::StdStream::isEos() | ||
51 | { | ||
52 | return false; | ||
53 | } | ||
54 | |||
55 | bool Bu::StdStream::isOpen() | ||
56 | { | ||
57 | return true; | ||
58 | } | ||
59 | |||
60 | void Bu::StdStream::flush() | ||
61 | { | ||
62 | fflush( stdout ); | ||
63 | } | ||
64 | |||
65 | bool Bu::StdStream::canRead() | ||
66 | { | ||
67 | return true; | ||
68 | } | ||
69 | |||
70 | bool Bu::StdStream::canWrite() | ||
71 | { | ||
72 | return true; | ||
73 | } | ||
74 | |||
75 | bool Bu::StdStream::isReadable() | ||
76 | { | ||
77 | return true; | ||
78 | } | ||
79 | |||
80 | bool Bu::StdStream::isWritable() | ||
81 | { | ||
82 | return true; | ||
83 | } | ||
84 | |||
85 | bool Bu::StdStream::isSeekable() | ||
86 | { | ||
87 | return false; | ||
88 | } | ||
89 | |||
90 | bool Bu::StdStream::isBlocking() | ||
91 | { | ||
92 | return true; | ||
93 | } | ||
94 | |||
95 | void Bu::StdStream::setBlocking( bool ) | ||
96 | { | ||
97 | } | ||
98 | |||
99 | void Bu::StdStream::setSize( Bu::size ) | ||
100 | { | ||
101 | } | ||
102 | |||
103 | Bu::size Bu::StdStream::getSize() const | ||
104 | { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | Bu::size Bu::StdStream::getBlockSize() const | ||
109 | { | ||
110 | return 0; | ||
111 | } | ||
112 | |||
113 | Bu::String Bu::StdStream::getLocation() const | ||
114 | { | ||
115 | return ""; | ||
116 | } | ||
117 | |||