From b5b68088f28b2593bfbf910a46fd52775007e8b3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 19 Nov 2007 09:39:24 +0000 Subject: Added the Bu::StdStream Stream class, it's just a wrapper for writing to, reading from standard output/input. --- src/stdstream.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/stdstream.h (limited to 'src/stdstream.h') 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 @@ +/* + * Copyright (C) 2007 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. + */ + +#ifndef BU_STD_STREAM_H +#define BU_STD_STREAM_H + +#include +#include +#include "stream.h" + +namespace Bu +{ + class StdStream : public Stream + { + public: + StdStream(); + virtual ~StdStream(); + + virtual void close(); + virtual size_t read( void *pBuf, size_t nBytes ); + virtual size_t write( const void *pBuf, size_t nBytes ); + virtual long tell(); + virtual void seek( long offset ); + virtual void setPos( long pos ); + virtual void setPosEnd( long pos ); + virtual bool isEOS(); + virtual bool isOpen(); + virtual void flush(); + virtual bool canRead(); + virtual bool canWrite(); + virtual bool isReadable(); + virtual bool isWritable(); + virtual bool isSeekable(); + virtual bool isBlocking(); + virtual void setBlocking( bool bBlocking=true ); + }; +} + +#endif -- cgit v1.2.3