aboutsummaryrefslogtreecommitdiff
path: root/src/stdstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stdstream.cpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/stdstream.cpp b/src/stdstream.cpp
new file mode 100644
index 0000000..1ddb3c1
--- /dev/null
+++ b/src/stdstream.cpp
@@ -0,0 +1,97 @@
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#include "bu/stdstream.h"
9
10Bu::StdStream::StdStream()
11{
12}
13
14Bu::StdStream::~StdStream()
15{
16}
17
18void Bu::StdStream::close()
19{
20}
21
22size_t Bu::StdStream::read( void *pBuf, size_t nBytes )
23{
24 return fread( pBuf, 1, nBytes, stdin );
25}
26
27size_t Bu::StdStream::write( const void *pBuf, size_t nBytes )
28{
29 return fwrite( pBuf, 1, nBytes, stdout );
30}
31
32long Bu::StdStream::tell()
33{
34 return 0;
35}
36
37void Bu::StdStream::seek( long offset )
38{
39}
40
41void Bu::StdStream::setPos( long pos )
42{
43}
44
45void Bu::StdStream::setPosEnd( long pos )
46{
47}
48
49bool Bu::StdStream::isEOS()
50{
51 return false;
52}
53
54bool Bu::StdStream::isOpen()
55{
56 return true;
57}
58
59void Bu::StdStream::flush()
60{
61 fflush( stdout );
62}
63
64bool Bu::StdStream::canRead()
65{
66 return true;
67}
68
69bool Bu::StdStream::canWrite()
70{
71 return true;
72}
73
74bool Bu::StdStream::isReadable()
75{
76 return true;
77}
78
79bool Bu::StdStream::isWritable()
80{
81 return true;
82}
83
84bool Bu::StdStream::isSeekable()
85{
86 return false;
87}
88
89bool Bu::StdStream::isBlocking()
90{
91 return true;
92}
93
94void Bu::StdStream::setBlocking( bool bBlocking )
95{
96}
97