summaryrefslogtreecommitdiff
path: root/src/stable/stdstream.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/stable/stdstream.cpp
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-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.cpp117
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
11Bu::StdStream::StdStream()
12{
13}
14
15Bu::StdStream::~StdStream()
16{
17}
18
19void Bu::StdStream::close()
20{
21}
22
23Bu::size Bu::StdStream::read( void *pBuf, Bu::size nBytes )
24{
25 return fread( pBuf, 1, nBytes, stdin );
26}
27
28Bu::size Bu::StdStream::write( const void *pBuf, Bu::size nBytes )
29{
30 return fwrite( pBuf, 1, nBytes, stdout );
31}
32
33Bu::size Bu::StdStream::tell()
34{
35 return 0;
36}
37
38void Bu::StdStream::seek( Bu::size )
39{
40}
41
42void Bu::StdStream::setPos( Bu::size )
43{
44}
45
46void Bu::StdStream::setPosEnd( Bu::size )
47{
48}
49
50bool Bu::StdStream::isEos()
51{
52 return false;
53}
54
55bool Bu::StdStream::isOpen()
56{
57 return true;
58}
59
60void Bu::StdStream::flush()
61{
62 fflush( stdout );
63}
64
65bool Bu::StdStream::canRead()
66{
67 return true;
68}
69
70bool Bu::StdStream::canWrite()
71{
72 return true;
73}
74
75bool Bu::StdStream::isReadable()
76{
77 return true;
78}
79
80bool Bu::StdStream::isWritable()
81{
82 return true;
83}
84
85bool Bu::StdStream::isSeekable()
86{
87 return false;
88}
89
90bool Bu::StdStream::isBlocking()
91{
92 return true;
93}
94
95void Bu::StdStream::setBlocking( bool )
96{
97}
98
99void Bu::StdStream::setSize( Bu::size )
100{
101}
102
103Bu::size Bu::StdStream::getSize() const
104{
105 return 0;
106}
107
108Bu::size Bu::StdStream::getBlockSize() const
109{
110 return 0;
111}
112
113Bu::String Bu::StdStream::getLocation() const
114{
115 return "";
116}
117