SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Protected Member Functions
RWFilteredUCharInputStreamImp Class Reference

Abstract base class for all the filtered UTF-16 character input stream implementation classes. More...

#include <rw/stream/RWFilteredUCharInputStreamImp.h>

Inheritance diagram for RWFilteredUCharInputStreamImp:
RWUCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock > RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp > RWSynchronizedUCharInputStreamImp

Public Member Functions

virtual ~RWFilteredUCharInputStreamImp ()
 
virtual RWSize available () const
 
virtual void close ()
 
virtual bool isBad () const
 
virtual bool isEof () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual RWUChar read ()
 
virtual RWSize read (RWUChar *unicodeArray, RWSize numUChars)
 
virtual RWSize readUntil (RWUChar *unicodeArray, RWSize maxSize, RWUChar delim)
 
virtual RWSize skip (RWSize numUnits)
 
- Public Member Functions inherited from RWUCharInputStreamImp
virtual ~RWUCharInputStreamImp ()
 
virtual RWUCharInputStream acquire ()
 
virtual void release ()
 
- Public Member Functions inherited from RWInputStreamImp
virtual ~RWInputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Protected Member Functions

 RWFilteredUCharInputStreamImp (const RWUCharInputStream &sourceStream)
 
RWUCharInputStreamgetSourceStream ()
 
const RWUCharInputStreamgetSourceStream () const
 
- Protected Member Functions inherited from RWUCharInputStreamImp
 RWUCharInputStreamImp ()
 
- Protected Member Functions inherited from RWInputStreamImp
 RWInputStreamImp ()
 
- Protected Member Functions inherited from RWStreamImp
 RWStreamImp ()
 
- Protected Member Functions inherited from RWBodyBase
 RWBodyBase (void)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (const RWBodyBase &second)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (const RWBodyBase &second)
 
- Protected Member Functions inherited from RWTCountingBody< RWMutexLock >
 RWTCountingBody (unsigned initCount=0)
 
 RWTCountingBody (RWStaticCtor)
 
 RWTCountingBody (const RWTCountingBody< RWMutexLock > &second)
 
RWTCountingBody< RWMutexLock > & operator= (const RWTCountingBody< RWMutexLock > &second)
 
 ~RWTCountingBody (void)
 
unsigned addReference (void)
 
unsigned references (void) const
 
unsigned removeReference (void)
 
- Protected Member Functions inherited from RWTMonitor< RWMutexLock >
 RWTMonitor ()
 
 RWTMonitor (RWStaticCtor)
 
 RWTMonitor (const RWTMonitor< RWMutexLock > &second)
 
 ~RWTMonitor ()
 
void acquire ()
 
bool isAcquired () const
 
RWTMonitor< RWMutexLock > & monitor () const
 
RWMutexLockmutex ()
 
RWTMonitor< RWMutexLock > & operator= (const RWTMonitor< RWMutexLock > &)
 
void release ()
 
bool tryAcquire ()
 

Additional Inherited Members

- Protected Types inherited from RWTCountingBody< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 
- Protected Types inherited from RWTMonitor< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 

Detailed Description

Abstract base class for all the filtered UTF-16 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 RWFilteredUCharInputStreamImp::~RWFilteredUCharInputStreamImp ( )
virtual

Destructor. Throws no exceptions.

RWFilteredUCharInputStreamImp::RWFilteredUCharInputStreamImp ( const RWUCharInputStream sourceStream)
inlineprotected

Used by derived classes to initialize the attached source stream.

Parameters
sourceStreamA handle to the attached source stream.

Member Function Documentation

virtual RWSize RWFilteredUCharInputStreamImp::available ( ) const
virtual

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

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual void RWFilteredUCharInputStreamImp::close ( )
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

RWUCharInputStream& RWFilteredUCharInputStreamImp::getSourceStream ( )
inlineprotected

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

const RWUCharInputStream& RWFilteredUCharInputStreamImp::getSourceStream ( ) const
inlineprotected

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

virtual bool RWFilteredUCharInputStreamImp::isBad ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual bool RWFilteredUCharInputStreamImp::isEof ( ) const
virtual

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

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual bool RWFilteredUCharInputStreamImp::isFail ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual bool RWFilteredUCharInputStreamImp::isGood ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual RWUChar RWFilteredUCharInputStreamImp::read ( )
virtual

Forwards the reading of a single UTF-16 character from the attached source stream.

Implements RWUCharInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual RWSize RWFilteredUCharInputStreamImp::read ( RWUChar unicodeArray,
RWSize  numUChars 
)
virtual

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

Parameters
unicodeArrayA pointer to the first element of the array. The array must have been pre-allocated to contain at least numUChars elements.
numUCharsThe number of unicode character(s) to be read from the stream.

Implements RWUCharInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual RWSize RWFilteredUCharInputStreamImp::readUntil ( RWUChar unicodeArray,
RWSize  maxSize,
RWUChar  delim 
)
virtual

Reads UTF-16 characters from the attached source stream until the last UTF-16 character read is equal to delim, or maxSize UTF-16 characters have been read, or the end of the input sequence is reached. The UTF-16 characters read are stored in unicodeArray. The function returns the actual number of UTF-16 characters read from the stream.

Parameters
unicodeArrayA pointer to the array receiving the UTF-16 character(s) extracted from the stream.
maxSizeThe maximum number of UTF-16 character(s) to be read.
delimThe UTF-16 character used as a delimiter.

Implements RWUCharInputStreamImp.

Reimplemented in RWSynchronizedUCharInputStreamImp.

virtual RWSize RWFilteredUCharInputStreamImp::skip ( RWSize  numUnits)
virtual

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

Parameters
numUnitsThe number of unicode character(s) to be skipped.

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.