SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
RWIstreamDataFromCharInputStreamImp Class Reference

Reads data in US-ASCII format from a narrow character stream. More...

#include <rw/stream/RWIstreamDataFromCharInputStreamImp.h>

Inheritance diagram for RWIstreamDataFromCharInputStreamImp:
RWDataFromCharInputStreamImp RWDataInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

Public Member Functions

virtual ~RWIstreamDataFromCharInputStreamImp ()
 
virtual RWSize available () const
 
virtual void close ()
 
virtual void getBool (bool &value)
 
virtual RWSize getBools (bool *arrayPt, RWSize count)
 
virtual void getChar (char &value)
 
virtual void getCharacter (char &value)
 
virtual RWSize getChars (char *arrayPt, RWSize count)
 
virtual RWSize getDelimitedString (char *string, RWSize maxCount, char delim)
 
virtual RWSize getDelimitedUString (RWUChar *ustring, RWSize maxCount, RWUChar delim)
 
virtual RWSize getDelimitedWString (wchar_t *wstring, RWSize maxCount, wchar_t delim)
 
virtual void getDouble (double &value)
 
virtual RWSize getDoubles (double *arrayPt, RWSize count)
 
virtual void getFloat (float &value)
 
virtual RWSize getFloats (float *arrayPt, RWSize count)
 
virtual void getInt (int &value)
 
virtual RWSize getInts (int *arrayPt, RWSize count)
 
virtual void getLong (long &value)
 
virtual void getLongDouble (long double &value)
 
virtual RWSize getLongDoubles (long double *arrayPt, RWSize count)
 
virtual void getLongLong (long long &value)
 
virtual RWSize getLongLongs (long long *arrayPt, RWSize count)
 
virtual RWSize getLongs (long *arrayPt, RWSize count)
 
virtual void getShort (short &value)
 
virtual RWSize getShorts (short *arrayPt, RWSize count)
 
virtual void getSignedChar (signed char &value)
 
virtual RWSize getSignedChars (signed char *arrayPt, RWSize count)
 
virtual void getSizeT (size_t &value)
 
virtual RWSize getString (char *string, RWSize count)
 
virtual void getUCharacter (RWUChar &value)
 
virtual void getUnsignedChar (unsigned char &value)
 
virtual RWSize getUnsignedChars (unsigned char *arrayPt, RWSize count)
 
virtual void getUnsignedInt (unsigned int &value)
 
virtual RWSize getUnsignedInts (unsigned int *arrayPt, RWSize count)
 
virtual void getUnsignedLong (unsigned long &value)
 
virtual void getUnsignedLongLong (unsigned long long &value)
 
virtual RWSize getUnsignedLongLongs (unsigned long long *arrayPt, RWSize count)
 
virtual RWSize getUnsignedLongs (unsigned long *arrayPt, RWSize count)
 
virtual void getUnsignedShort (unsigned short &value)
 
virtual RWSize getUnsignedShorts (unsigned short *arrayPt, RWSize count)
 
virtual RWSize getUString (RWUChar *arrayPt, RWSize count)
 
virtual void getWchar_t (wchar_t &value)
 
virtual RWSize getWchar_ts (wchar_t *arrayPt, RWSize count)
 
virtual void getWCharacter (wchar_t &value)
 
virtual RWSize getWString (wchar_t *wstring, RWSize count)
 
virtual bool isBad () const
 
virtual bool isEof () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual RWSize skip (RWSize numUnits)
 
- Public Member Functions inherited from RWDataFromCharInputStreamImp
virtual ~RWDataFromCharInputStreamImp ()
 
- Public Member Functions inherited from RWDataInputStreamImp
virtual ~RWDataInputStreamImp ()
 
- Public Member Functions inherited from RWInputStreamImp
virtual ~RWInputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Static Public Member Functions

static RWDataInputStream make (const RWCharInputStream &source)
 
static RWDataInputStream make (const RWCharInputStream &source, std::ios *&formatter)
 

Protected Member Functions

 RWIstreamDataFromCharInputStreamImp (const RWCharInputStream &sourceStream)
 
 RWIstreamDataFromCharInputStreamImp (const RWCharInputStream &sourceStream, std::ios *&formatter)
 
std::istream & getCheckedIstream ()
 
const std::istream & getCheckedIstream () const
 
std::ios & getIos ()
 
std::istream & getIstream ()
 
const std::istream & getIstream () const
 
- Protected Member Functions inherited from RWDataFromCharInputStreamImp
 RWDataFromCharInputStreamImp (const RWCharInputStream &sourceStream)
 
RWCharInputStreamgetSourceStream ()
 
const RWCharInputStreamgetSourceStream () const
 
- Protected Member Functions inherited from RWDataInputStreamImp
 RWDataInputStreamImp ()
 
- 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

The class RWIstreamDataFromCharInputStreamImp reads data in US-ASCII format from a narrow character stream. The RWOstreamDataToCharOutputStreamImp or iostreams std::ostream class generates the format being read. Implements the body idiom from the handle-body pattern.

Constructor & Destructor Documentation

virtual RWIstreamDataFromCharInputStreamImp::~RWIstreamDataFromCharInputStreamImp ( )
virtual

Destructor.

RWIstreamDataFromCharInputStreamImp::RWIstreamDataFromCharInputStreamImp ( const RWCharInputStream sourceStream)
protected

Initializes the reference to the narrow character stream that will be used as the source of characters.

Parameters
sourceStreamThe narrow character stream that will serve as the source of characters.
RWIstreamDataFromCharInputStreamImp::RWIstreamDataFromCharInputStreamImp ( const RWCharInputStream sourceStream,
std::ios *&  formatter 
)
protected

Initializes the reference to the narrow character stream that will be used as the source of characters.

Parameters
sourceStreamThe narrow character stream that will serve as the source of characters.
formatterAn object that can be used to modify the format recognized by the stream. This object is initialized by the stream and then returned to the caller.

Member Function Documentation

virtual RWSize RWIstreamDataFromCharInputStreamImp::available ( ) const
virtual

Returns the number of narrow characters that can be read from the embedded iostreams std::istream object without blocking. Throws no exceptions.

Reimplemented from RWDataFromCharInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::close ( )
virtual

Forwards the close() call to the next processing narrow character input stream.

Reimplemented from RWDataFromCharInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getBool ( bool &  value)
virtual

Reads a bool value from the stream.

Parameters
valueThe bool value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getBools ( bool *  arrayPt,
RWSize  count 
)
virtual

Reads an array of bool value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getChar ( char &  value)
virtual

Reads a char value from the stream.

Parameters
valueThe char value to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getCharacter ( char &  value)
virtual

Reads a char value from the stream.

Parameters
valueThe char value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getChars ( char *  arrayPt,
RWSize  count 
)
virtual

Reads an array of char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

std::istream& RWIstreamDataFromCharInputStreamImp::getCheckedIstream ( )
protected

Returns the embedded iostreams std::istream object that is used to format data.

Exceptions
RWExternalStreamExceptionThrown if the embedded std::istream object is in a failed or bad state.
const std::istream& RWIstreamDataFromCharInputStreamImp::getCheckedIstream ( ) const
protected

Returns the embedded iostreams std::istream object that is used to format data.

Exceptions
RWExternalStreamExceptionThrown if the embedded std::istream object is in a failed or bad state.
virtual RWSize RWIstreamDataFromCharInputStreamImp::getDelimitedString ( char *  string,
RWSize  maxCount,
char  delim 
)
virtual

Reads narrow characters from the stream until the last character read is equal to delim, or maxCount narrow characters have been read, or the end of the input sequence is reached. The narrow characters read are stored in string. The function returns the actual number of narrow characters read from the stream.

Parameters
stringA pointer to the string receiving the narrow characters extracted from the stream.
maxCountThe maximum number of narrow characters to be read.
delimThe narrow character used as a delimiter.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getDelimitedUString ( RWUChar ustring,
RWSize  maxCount,
RWUChar  delim 
)
virtual

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

Parameters
ustringA pointer to the string receiving the UTF-16 characters extracted from the stream.
maxCountThe maximum number of UTF-16 characters to be read.
delimThe UTF-16 character used as a delimiter.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getDelimitedWString ( wchar_t *  wstring,
RWSize  maxCount,
wchar_t  delim 
)
virtual

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

Parameters
wstringA pointer to the string receiving the wide characters extracted from the stream.
maxCountThe maximum number of wide characters to be read.
delimThe wide character used as a delimiter.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getDouble ( double &  value)
virtual

Reads a double value from the stream.

Parameters
valueThe double value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getDoubles ( double *  arrayPt,
RWSize  count 
)
virtual

Reads an array of double value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getFloat ( float &  value)
virtual

Reads a float value from the stream.

Parameters
valueThe float value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getFloats ( float *  arrayPt,
RWSize  count 
)
virtual

Reads an array of float value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getInt ( int &  value)
virtual

Reads a int value from the stream.

Parameters
valueThe int value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getInts ( int *  arrayPt,
RWSize  count 
)
virtual

Reads an array of int value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

std::ios& RWIstreamDataFromCharInputStreamImp::getIos ( )
inlineprotected

Returns a reference to the std::ios base class of the embedded std::istream object. The std::ios reference can then be used to modify the format flags used by the embedded std::istream object when decoding formatted US-ASCII representation of the data inserted in this input stream.

std::istream& RWIstreamDataFromCharInputStreamImp::getIstream ( )
inlineprotected

Returns the embedded iostreams std::istream object that is used to format data. Throws no exceptions.

const std::istream& RWIstreamDataFromCharInputStreamImp::getIstream ( ) const
inlineprotected

Returns the embedded iostreams std::istream object that is used to format data. Throws no exceptions.

virtual void RWIstreamDataFromCharInputStreamImp::getLong ( long &  value)
virtual

Reads a long value from the stream.

Parameters
valueThe long value to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getLongDouble ( long double &  value)
virtual

Reads a long double value from the stream.

Parameters
valueThe long double value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getLongDoubles ( long double *  arrayPt,
RWSize  count 
)
virtual

Reads an array of long double value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getLongLong ( long long &  value)
virtual

Reads a long long value from the stream.

Parameters
valueThe long long value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getLongLongs ( long long *  arrayPt,
RWSize  count 
)
virtual

Reads an array of long long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getLongs ( long *  arrayPt,
RWSize  count 
)
virtual

Reads an array of long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getShort ( short &  value)
virtual

Reads a short value from the stream.

Parameters
valueThe short value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getShorts ( short *  arrayPt,
RWSize  count 
)
virtual

Reads an array of short value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getSignedChar ( signed char &  value)
virtual

Reads a signed char value from the stream.

Parameters
valueThe signed char value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getSignedChars ( signed char *  arrayPt,
RWSize  count 
)
virtual

Reads an array of signed char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getSizeT ( size_t &  value)
virtual

Reads a size_t value from the stream.

Parameters
valueThe size_t value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getString ( char *  string,
RWSize  count 
)
virtual

Reads a narrow character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
stringA pointer to the string's first element.
countThe number of elements to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUCharacter ( RWUChar value)
virtual

Reads a UTF-16 character from the stream.

Parameters
valueThe UTF-16 value to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUnsignedChar ( unsigned char &  value)
virtual

Reads a unsigned char value from the stream.

Parameters
valueThe unsigned char value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUnsignedChars ( unsigned char *  arrayPt,
RWSize  count 
)
virtual

Reads an array of unsigned char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUnsignedInt ( unsigned int &  value)
virtual

Reads a unsigned int value from the stream.

Parameters
valueThe unsigned int value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUnsignedInts ( unsigned int *  arrayPt,
RWSize  count 
)
virtual

Reads an array of unsigned int value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUnsignedLong ( unsigned long &  value)
virtual

Reads a unsigned long value from the stream.

Parameters
valueThe unsigned long value to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUnsignedLongLong ( unsigned long long &  value)
virtual

Reads a unsigned long long value from the stream.

Parameters
valueThe unsigned long long value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUnsignedLongLongs ( unsigned long long *  arrayPt,
RWSize  count 
)
virtual

Reads an array of unsigned long long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUnsignedLongs ( unsigned long *  arrayPt,
RWSize  count 
)
virtual

Reads an array of unsigned long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getUnsignedShort ( unsigned short &  value)
virtual

Reads a unsigned short value from the stream.

Parameters
valueThe unsigned short value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUnsignedShorts ( unsigned short *  arrayPt,
RWSize  count 
)
virtual

Reads an array of unsigned short value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getUString ( RWUChar arrayPt,
RWSize  count 
)
virtual

Reads a UTF-16 character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the string's first element.
countThe number of elements to be read from the stream.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getWchar_t ( wchar_t &  value)
virtual

Reads a wchar_t value from the stream.

Parameters
valueThe wchar_t value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getWchar_ts ( wchar_t *  arrayPt,
RWSize  count 
)
virtual

Reads an array of wchar_t value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be read from the stream.
Exceptions
RWIncompleteStreamOperationThrown when elements from the stream cannot be read.

Implements RWDataInputStreamImp.

virtual void RWIstreamDataFromCharInputStreamImp::getWCharacter ( wchar_t &  value)
virtual

Reads a wchar_t value from the stream.

Parameters
valueThe wchar_t value to be read from the stream.

Implements RWDataInputStreamImp.

virtual RWSize RWIstreamDataFromCharInputStreamImp::getWString ( wchar_t *  wstring,
RWSize  count 
)
virtual

Reads a wide character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
wstringA pointer to the string's first element.
countThe number of elements to be read from the stream.

Implements RWDataInputStreamImp.

virtual bool RWIstreamDataFromCharInputStreamImp::isBad ( ) const
virtual

Returns true if either one of the embedded iostreams std::istream objects, or the next processing narrow character input stream object is in a bad state. Throws no exceptions.

Reimplemented from RWDataFromCharInputStreamImp.

virtual bool RWIstreamDataFromCharInputStreamImp::isEof ( ) const
virtual

Returns true if either one of the embedded iostreams std::istream objects or the next processing narrow character input stream object is in an eof state. Throws no exceptions.

Reimplemented from RWDataFromCharInputStreamImp.

virtual bool RWIstreamDataFromCharInputStreamImp::isFail ( ) const
virtual

Returns true if either one of the embedded iostreams std::istream objects or the next processing narrow character input stream object is in a failed state. Throws no exceptions.

Reimplemented from RWDataFromCharInputStreamImp.

virtual bool RWIstreamDataFromCharInputStreamImp::isGood ( ) const
virtual

Returns true if both the embedded iostreams std::istream object, and the next processing narrow character input stream object are in good state. Throws no exceptions.

Reimplemented from RWDataFromCharInputStreamImp.

static RWDataInputStream RWIstreamDataFromCharInputStreamImp::make ( const RWCharInputStream source)
inlinestatic

Constructs an RWIstreamDataFromCharInputStreamImp instance that uses source as its source of narrow characters, and returns a handle to it. Throws no exceptions.

Parameters
sourceThe narrow character stream that is used as the source of characters.
static RWDataInputStream RWIstreamDataFromCharInputStreamImp::make ( const RWCharInputStream source,
std::ios *&  formatter 
)
inlinestatic

Constructs an RWIstreamDataFromCharInputStreamImp instance that uses source as its source of narrow characters, and returns a handle to it. Throws no exceptions.

Parameters
sourceThe narrow character stream that is used as the source of characters.
formatterAn object that can be used to modify the format recognized by the stream. This object is initialized by the stream and then returned to the caller.
virtual RWSize RWIstreamDataFromCharInputStreamImp::skip ( RWSize  numUnits)
virtual

Skips numUnits narrow characters from the embedded iostreams std::istream object if possible. The function returns the actual number of narrow characters skipped, which can be any value between 0 and numUnits.

Parameters
numUnitsThe number of narrow characters to be skipped.

Reimplemented from RWDataFromCharInputStreamImp.

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