SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Abstract base class for all the filtered binary input stream implementation classes. More...
#include <rw/stream/RWFilteredByteInputStreamImp.h>
Public Member Functions | |
virtual | ~RWFilteredByteInputStreamImp () |
virtual void | close () |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isEof () const |
virtual bool | isGood () const |
virtual RWByte | read () |
virtual RWSize | read (RWByte *byteArray, RWSize numBytes) |
virtual RWSize | readUntil (RWByte *byteArray, RWSize maxSize, RWByte delim) |
virtual RWSize | available () const |
virtual RWSize | skip (RWSize numUnits) |
Protected Member Functions | |
RWFilteredByteInputStreamImp (const RWByteInputStream &sourceStream) | |
RWByteInputStream & | getSourceStream () |
const RWByteInputStream & | getSourceStream () const |
Abstract base class for all the filtered binary input stream implementation classes. A filtered input stream is a stream that uses its attached input stream as the source of elements to its own functions. Implements the body idiom from the handle-body pattern.
virtual RWFilteredByteInputStreamImp::~RWFilteredByteInputStreamImp | ( | ) | [virtual] |
Destructor. Throws no exceptions.
RWFilteredByteInputStreamImp::RWFilteredByteInputStreamImp | ( | const RWByteInputStream & | sourceStream | ) | [inline, protected] |
Used by derived classes to initialize the attached source stream. Throws no exceptions.
sourceStream | A handle to the attached source stream. |
virtual RWSize RWFilteredByteInputStreamImp::available | ( | ) | const [virtual] |
Returns the number of bytes that can be read from the attached source stream without blocking. Throws no exceptions.
Implements RWInputStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
virtual void RWFilteredByteInputStreamImp::close | ( | ) | [virtual] |
Forwards the close() request to the attached source stream.
Implements RWStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
const RWByteInputStream& RWFilteredByteInputStreamImp::getSourceStream | ( | ) | const [inline, protected] |
Returns a handle to the attached source stream. Throws no exceptions.
RWByteInputStream& RWFilteredByteInputStreamImp::getSourceStream | ( | ) | [inline, protected] |
Returns a handle to the attached source stream. Throws no exceptions.
virtual bool RWFilteredByteInputStreamImp::isBad | ( | ) | const [virtual] |
Forwards the isBad() request to the attached source stream. Throws no exceptions.
Implements RWStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
virtual bool RWFilteredByteInputStreamImp::isEof | ( | ) | const [virtual] |
Forwards the isEof() request to the attached source stream. Throws no exceptions.
Implements RWInputStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
virtual bool RWFilteredByteInputStreamImp::isFail | ( | ) | const [virtual] |
Forwards the isFail() request to the attached source stream. Throws no exceptions.
Implements RWStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
virtual bool RWFilteredByteInputStreamImp::isGood | ( | ) | const [virtual] |
Forwards the isGood() request to the attached source stream. Throws no exceptions.
Implements RWStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
Forwards the reading of an array of bytes from the attached source stream. The function returns the actual number of bytes read.
byteArray | A pointer to the first element of the array. The array must have been pre-allocated to contain at least numBytes elements. | |
numBytes | The number of byte(s) to be read from the stream. |
Implements RWByteInputStreamImp.
virtual RWByte RWFilteredByteInputStreamImp::read | ( | ) | [virtual] |
Forwards the reading of a single byte to the attached source stream.
Implements RWByteInputStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
virtual RWSize RWFilteredByteInputStreamImp::readUntil | ( | RWByte * | byteArray, | |
RWSize | maxSize, | |||
RWByte | delim | |||
) | [virtual] |
Reads bytes from the attached source stream until the last byte read is equal to delim, or maxSize bytes have been read, or the end of the input sequence is reached. The bytes read are stored in byteArray. The function returns the actual number of bytes read from the stream.
byteArray | A pointer to the array receiving the byte(s) extracted from the stream. | |
maxSize | The maximum number of byte(s) to be read. | |
delim | The byte value used as a delimeter. |
Implements RWByteInputStreamImp.
Reimplemented in RWSynchronizedByteInputStreamImp.
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.
numUnits | The number of byte(s) to be skipped. |
Implements RWInputStreamImp.
Reimplemented in RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp >.
© 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.