From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/substream.h | 92 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'src/stable/substream.h') diff --git a/src/stable/substream.h b/src/stable/substream.h index 5905043..f79ed0b 100644 --- a/src/stable/substream.h +++ b/src/stable/substream.h @@ -12,52 +12,52 @@ namespace Bu { - /** - * Creates a sub-stream of a given stream. This allows you to read and - * write safely to a section of another stream, keeping all data within - * the given bounds. The substream acts exactly like a top level stream - * when you reach the bounds of either the containing stream or the - * artificial bounds of the substream, except that unlike many stream types, - * when writing you cannot move beyond the bounds of the substream. Reads, - * on the other hand, work exactly the same way, returning less data than - * requested when the end of the stream is reached. - * - * The substream always begins at the current position in the base stream, - * if you would like to skip some data first, simply seek. - * - * The substream class is safe to use with all blocking and non-blocking - * base streams, including sockets, however it can have unpredictable - * results when used on a buffering stream that may read more data than - * requested in order to complete a request such as the buffer or bzip2 - * filters. - */ - class SubStream : public Bu::Filter - { - public: - SubStream( Bu::Stream &rNext, Bu::size iSize ); - virtual ~SubStream(); - - virtual Bu::size read( void *pBuf, Bu::size nBytes ); - virtual Bu::size write( const void *pBuf, Bu::size nBytes ); - using Bu::Stream::write; - - virtual void start(); - virtual Bu::size stop(); - virtual void close(); - virtual Bu::size tell(); - virtual void seek( Bu::size offset ); - virtual void setPos( Bu::size pos ); - virtual void setPosEnd( Bu::size pos ); - virtual bool isEos(); - - virtual bool canRead(); - virtual bool canWrite(); - - protected: - Bu::size iStart; - Bu::size iPos; - Bu::size iSize; - }; + /** + * Creates a sub-stream of a given stream. This allows you to read and + * write safely to a section of another stream, keeping all data within + * the given bounds. The substream acts exactly like a top level stream + * when you reach the bounds of either the containing stream or the + * artificial bounds of the substream, except that unlike many stream types, + * when writing you cannot move beyond the bounds of the substream. Reads, + * on the other hand, work exactly the same way, returning less data than + * requested when the end of the stream is reached. + * + * The substream always begins at the current position in the base stream, + * if you would like to skip some data first, simply seek. + * + * The substream class is safe to use with all blocking and non-blocking + * base streams, including sockets, however it can have unpredictable + * results when used on a buffering stream that may read more data than + * requested in order to complete a request such as the buffer or bzip2 + * filters. + */ + class SubStream : public Bu::Filter + { + public: + SubStream( Bu::Stream &rNext, Bu::size iSize ); + virtual ~SubStream(); + + virtual Bu::size read( void *pBuf, Bu::size nBytes ); + virtual Bu::size write( const void *pBuf, Bu::size nBytes ); + using Bu::Stream::write; + + virtual void start(); + virtual Bu::size stop(); + virtual void close(); + virtual Bu::size tell(); + virtual void seek( Bu::size offset ); + virtual void setPos( Bu::size pos ); + virtual void setPosEnd( Bu::size pos ); + virtual bool isEos(); + + virtual bool canRead(); + virtual bool canWrite(); + + protected: + Bu::size iStart; + Bu::size iPos; + Bu::size iSize; + }; }; #endif -- cgit v1.2.3