From 469bbcf0701e1eb8a6670c23145b0da87357e178 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 25 Mar 2012 20:00:08 +0000 Subject: Code is all reorganized. We're about ready to release. I should write up a little explenation of the arrangement. --- src/stable/stdstream.cpp | 117 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 src/stable/stdstream.cpp (limited to 'src/stable/stdstream.cpp') 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 @@ +/* + * Copyright (C) 2007-2011 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ + +#include +#include "bu/stdstream.h" + +Bu::StdStream::StdStream() +{ +} + +Bu::StdStream::~StdStream() +{ +} + +void Bu::StdStream::close() +{ +} + +Bu::size Bu::StdStream::read( void *pBuf, Bu::size nBytes ) +{ + return fread( pBuf, 1, nBytes, stdin ); +} + +Bu::size Bu::StdStream::write( const void *pBuf, Bu::size nBytes ) +{ + return fwrite( pBuf, 1, nBytes, stdout ); +} + +Bu::size Bu::StdStream::tell() +{ + return 0; +} + +void Bu::StdStream::seek( Bu::size ) +{ +} + +void Bu::StdStream::setPos( Bu::size ) +{ +} + +void Bu::StdStream::setPosEnd( Bu::size ) +{ +} + +bool Bu::StdStream::isEos() +{ + return false; +} + +bool Bu::StdStream::isOpen() +{ + return true; +} + +void Bu::StdStream::flush() +{ + fflush( stdout ); +} + +bool Bu::StdStream::canRead() +{ + return true; +} + +bool Bu::StdStream::canWrite() +{ + return true; +} + +bool Bu::StdStream::isReadable() +{ + return true; +} + +bool Bu::StdStream::isWritable() +{ + return true; +} + +bool Bu::StdStream::isSeekable() +{ + return false; +} + +bool Bu::StdStream::isBlocking() +{ + return true; +} + +void Bu::StdStream::setBlocking( bool ) +{ +} + +void Bu::StdStream::setSize( Bu::size ) +{ +} + +Bu::size Bu::StdStream::getSize() const +{ + return 0; +} + +Bu::size Bu::StdStream::getBlockSize() const +{ + return 0; +} + +Bu::String Bu::StdStream::getLocation() const +{ + return ""; +} + -- cgit v1.2.3