SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWFilteredWCharInputStreamImp Class Reference

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

#include <rw/stream/RWFilteredWCharInputStreamImp.h>

Inheritance diagram for RWFilteredWCharInputStreamImp:
RWWCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock > RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp > RWSynchronizedWCharInputStreamImp

Public Member Functions

virtual ~RWFilteredWCharInputStreamImp ()
 
virtual RWSize available () const
 
virtual void close ()
 
virtual bool isBad () const
 
virtual bool isEof () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual wchar_t read ()
 
virtual RWSize read (wchar_t *wcharArray, RWSize numWChars)
 
virtual RWSize readUntil (wchar_t *wcharArray, RWSize maxSize, wchar_t delim)
 
virtual RWSize skip (RWSize numUnits)
 
- Public Member Functions inherited from RWWCharInputStreamImp
virtual ~RWWCharInputStreamImp ()
 
virtual RWWCharInputStream acquire ()
 
virtual void release ()
 
- Public Member Functions inherited from RWInputStreamImp
virtual ~RWInputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Protected Member Functions

 RWFilteredWCharInputStreamImp (const RWWCharInputStream &sourceStream)
 
RWWCharInputStreamgetSourceStream ()
 
const RWWCharInputStreamgetSourceStream () const
 
- Protected Member Functions inherited from RWWCharInputStreamImp
 RWWCharInputStreamImp ()
 
- Protected Member Functions inherited from RWInputStreamImp
 RWInputStreamImp ()
 
- Protected Member Functions inherited from RWStreamImp
 RWStreamImp ()
 
- Protected Member Functions inherited from RWBodyBase
 RWBodyBase (const RWBodyBase &second)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (void)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (const RWBodyBase &second)
 
- Protected Member Functions inherited from RWTCountingBody< RWMutexLock >
 RWTCountingBody (const RWTCountingBody< RWMutexLock > &second)
 
 RWTCountingBody (RWStaticCtor)
 
 RWTCountingBody (unsigned initCount=0)
 
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 (const RWTMonitor< RWMutexLock > &second)
 
 RWTMonitor (RWStaticCtor)
 
 RWTMonitor (void)
 
 ~RWTMonitor (void)
 
void acquire (void)
 
bool isAcquired (void) const
 
RWTMonitor< RWMutexLock > & monitor (void) const
 
RWMutexLockmutex (void)
 
RWTMonitor< RWMutexLock > & operator= (const RWTMonitor< RWMutexLock > &)
 
void release (void)
 
bool tryAcquire (void)
 

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 wide 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

◆ ~RWFilteredWCharInputStreamImp()

virtual RWFilteredWCharInputStreamImp::~RWFilteredWCharInputStreamImp ( )
virtual

Destructor.

◆ RWFilteredWCharInputStreamImp()

RWFilteredWCharInputStreamImp::RWFilteredWCharInputStreamImp ( const RWWCharInputStream & sourceStream)
inlineprotected

Used by derived classes to initialize the attached source stream.

Parameters
sourceStreamA handle to the attached source stream.

Member Function Documentation

◆ available()

virtual RWSize RWFilteredWCharInputStreamImp::available ( ) const
virtual

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

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ close()

virtual void RWFilteredWCharInputStreamImp::close ( )
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ getSourceStream() [1/2]

RWWCharInputStream & RWFilteredWCharInputStreamImp::getSourceStream ( )
inlineprotected

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

◆ getSourceStream() [2/2]

const RWWCharInputStream & RWFilteredWCharInputStreamImp::getSourceStream ( ) const
inlineprotected

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

◆ isBad()

virtual bool RWFilteredWCharInputStreamImp::isBad ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ isEof()

virtual bool RWFilteredWCharInputStreamImp::isEof ( ) const
virtual

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

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ isFail()

virtual bool RWFilteredWCharInputStreamImp::isFail ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ isGood()

virtual bool RWFilteredWCharInputStreamImp::isGood ( ) const
virtual

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

Implements RWStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ read() [1/2]

virtual wchar_t RWFilteredWCharInputStreamImp::read ( )
virtual

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

Implements RWWCharInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ read() [2/2]

virtual RWSize RWFilteredWCharInputStreamImp::read ( wchar_t * wcharArray,
RWSize numWChars )
virtual

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

Parameters
wcharArrayA pointer to the first element of the array. The array must have been pre-allocated to contain at least 'numWChars' elements.
numWCharsThe number of wide character(s) to be read from the stream.

Implements RWWCharInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

◆ readUntil()

virtual RWSize RWFilteredWCharInputStreamImp::readUntil ( wchar_t * wcharArray,
RWSize maxSize,
wchar_t delim )
virtual

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

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

Implements RWWCharInputStreamImp.

Reimplemented in RWSynchronizedWCharInputStreamImp.

◆ skip()

virtual RWSize RWFilteredWCharInputStreamImp::skip ( RWSize numUnits)
virtual

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

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

Implements RWInputStreamImp.

Reimplemented in RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.

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