rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWFilteredCharInputStreamImp Class Reference
[Streams]

Abstract base class for all the filtered narrow character input stream implementation classes. More...

#include <rw/stream/RWFilteredCharInputStreamImp.h>

Inheritance diagram for RWFilteredCharInputStreamImp:
RWCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock > RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp > RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp > RWBufferedCharInputStreamImp RWSynchronizedCharInputStreamImp

List of all members.

Public Member Functions

virtual ~RWFilteredCharInputStreamImp ()
virtual void close ()
virtual bool isBad () const
virtual bool isFail () const
virtual bool isEof () const
virtual bool isGood () const
virtual char read ()
virtual RWSize read (char *charArray, RWSize numChars)
virtual void readStringUntil (RWCString &string, char delim)
virtual RWSize readUntil (char *charArray, RWSize maxSize, char delim)
virtual RWSize available () const
virtual RWSize skip (RWSize numUnits)

Protected Member Functions

 RWFilteredCharInputStreamImp (const RWCharInputStream &sourceStream)
RWCharInputStreamgetSourceStream ()
const RWCharInputStreamgetSourceStream () const

Detailed Description

Abstract base class for all the filtered narrow character 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.


Constructor & Destructor Documentation

virtual RWFilteredCharInputStreamImp::~RWFilteredCharInputStreamImp (  )  [virtual]

Destructor. Throws no exceptions.

RWFilteredCharInputStreamImp::RWFilteredCharInputStreamImp ( const RWCharInputStream sourceStream  )  [inline, protected]

Used by derived classes to initialize the attached source stream. Throws no exceptions.

Parameters:
sourceStream A handle to the attached source stream.

Member Function Documentation

virtual RWSize RWFilteredCharInputStreamImp::available (  )  const [virtual]

Returns the number of narrow characters that can be read from the attached source stream without blocking. Throws no exceptions.

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual void RWFilteredCharInputStreamImp::close (  )  [virtual]

Forwards the close() request to the attached source stream.

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

const RWCharInputStream& RWFilteredCharInputStreamImp::getSourceStream (  )  const [inline, protected]

Returns a handle to the attached source stream. Throws no exceptions.

RWCharInputStream& RWFilteredCharInputStreamImp::getSourceStream (  )  [inline, protected]

Returns a handle to the attached source stream. Throws no exceptions.

virtual bool RWFilteredCharInputStreamImp::isBad (  )  const [virtual]

Forwards the isBad() request to the attached source stream. Throws no exceptions.

Implements RWStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual bool RWFilteredCharInputStreamImp::isEof (  )  const [virtual]

Forwards the isEof() request to the attached source stream. Throws no exceptions.

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual bool RWFilteredCharInputStreamImp::isFail (  )  const [virtual]

Forwards the isFail() request to the attached source stream. Throws no exceptions.

Implements RWStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual bool RWFilteredCharInputStreamImp::isGood (  )  const [virtual]

Forwards the isGood() request to the attached source stream. Throws no exceptions.

Implements RWStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual RWSize RWFilteredCharInputStreamImp::read ( char *  charArray,
RWSize  numChars 
) [virtual]

Forwards the reading of an array of narrow characters from the attached source stream. The function returns the actual number of narrow characters read.

Parameters:
charArray A pointer to the first element of the array. The array must have been pre-allocated to contain at least numChars elements.
numChars The number of narrow character(s) to be read from the stream.

Implements RWCharInputStreamImp.

virtual char RWFilteredCharInputStreamImp::read (  )  [virtual]

Forwards the reading of a single narrow character from the attached source stream.

Implements RWCharInputStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

virtual void RWFilteredCharInputStreamImp::readStringUntil ( RWCString string,
char  delim 
) [virtual]

Reads narrow character(s) from the attached source stream until the last character read is equal to delim, or the end of the input sequence is reached. The narrow character(s) read are stored in a narrow string object.

Parameters:
string A string object receiving the narrow character(s) extracted from the stream.
delim The narrow character used as a delimeter.

Implements RWCharInputStreamImp.

Reimplemented in RWBufferedCharInputStreamImp, and RWSynchronizedCharInputStreamImp.

virtual RWSize RWFilteredCharInputStreamImp::readUntil ( char *  charArray,
RWSize  maxSize,
char  delim 
) [virtual]

Reads narrow character(s) from the attached source stream until the last narrow character read is equal to delim, or maxSize narrow character(s) have been read, or the end of the input sequence is reached. The narrow character(s) read are stored in charArray. The function returns the actual number of narrow character(s) read from the stream.

Parameters:
charArray A pointer to the array receiving the narrow character(s) extracted from the stream.
maxSize The maximum number of narrow character(s) to be read.
delim The narrow character value used as a delimeter.

Implements RWCharInputStreamImp.

Reimplemented in RWSynchronizedCharInputStreamImp.

virtual RWSize RWFilteredCharInputStreamImp::skip ( RWSize  numUnits  )  [virtual]

Skips numUnits narrow characters from the input sequence of the attached source stream if possible. The function returns the actual number of narrow characters skipped, which can be any value between 0 and numUnits.

Parameters:
numUnits The number of narrow character(s) to be skipped.

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp >, and RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.