Module: Advanced Tools Package: Streams
RWDataFromByteInputStreamImp RWDataInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase
available() clearFail() close() |
getSourceStream() isBad() isEof() |
isFail() isGood() RWDataFromByteInputStreamImp() |
setFail() skip() ~RWDataFromByteInputStreamImp() |
#include <rw/stream/RWDataFromByteInputStreamImp.h>
Abstract base class for all the data from the binary conversion input stream implementation classes. A conversion input stream is a stream that uses an attached input stream of a different format as the source of elements to its own functions. Implements the body idiom from the handle-body pattern.
RWDataFromByteInputStreamImp(RWByteInputStream& sourceStream);
Used by the derived classes to initialize the attached source stream.
Parameter List
sourceStream |
A handle to the attached source stream. |
virtual ~RWDataFromByteInputStreamImp();
Destructor.
virtual RWSize available() const;
Returns the number of bytes that can be read from the attached source stream without blocking. Throws no exceptions.
virtual void close();
Forwards the close() request to the attached source stream.
virtual bool isBad() const;
Forwards the isBad() request to the attached source stream. Throws no exceptions.
virtual bool isEof() const;
Forwards the isEof() request to the attached source stream. Throws no exceptions.
virtual bool isFail() const;
Forwards the isFail() request to the attached source stream. Throws no exceptions.
virtual bool isGood() const;
Forwards the isGood() request to the attached source stream. Throws no exceptions.
virtual RWSize skip(RWSize numUnits);
Skips numUnits bytes from the input sequence of the attached source stream, if possible. The function returns the actual number of bytes skipped, which can be any value between 0 and numUnits.
Parameter List
numUnits |
The number of bytes to be skipped. |
void clearFail();
Clears the data stream fail bit. Throws no exceptions.
RWByteInputStream& getSourceStream(); const RWByteInputStream& getSourceStream() const;
These functions return a handle to the attached source stream. They throw no exceptions.
void setFail();
Sets the data stream fail bit. Throws no exceptions.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.