rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUCharInputStream Class Reference
[Streams]

Handle class for all the UTF-16 character input stream implementation classes. More...

#include <rw/stream/RWUCharInputStream.h>

Inheritance diagram for RWUCharInputStream:
RWHandleBase

List of all members.

Public Member Functions

 RWUCharInputStream (RWUCharInputStreamImp *body)
 RWUCharInputStream (const RWUCharInputStream &handle)
RWUCharInputStreamoperator= (const RWUCharInputStream &handle)
RWUCharInputStreamoperator>> (RWUCharInputStream &(*pf)(RWUCharInputStream &))
RWUCharInputStream operator>> (RWUCharInputStream(*pf)(RWUCharInputStream &))
RWUCharInputStreamoperator>> (RWUChar &unicodeValue)
RWUChar read ()
RWSize read (RWUChar *unicodeArray, RWSize numUChars)
RWSize readUntil (RWUChar *unicodeArray, RWSize maxSize, RWUChar delim)
void close ()
bool isBad () const
bool isFail () const
bool isGood () const
bool isEof () const
RWSize available () const
RWSize skip (RWSize numUnits)

Related Functions

(Note that these are not member functions.)



RWUCharInputStreamrwDisc (RWUCharInputStream &stream)

Detailed Description

Handle class for all the UTF-16 character input stream implementation classes. Implements the handle idiom from the handle-body pattern.


Constructor & Destructor Documentation

RWUCharInputStream::RWUCharInputStream ( RWUCharInputStreamImp body  )  [inline, explicit]

Constructor.

RWUCharInputStream::RWUCharInputStream ( const RWUCharInputStream handle  )  [inline]

Copy constructor.

Parameters:
handle A UTF-16 character stream handle used to initialize the newly created handle.

Member Function Documentation

RWSize RWUCharInputStream::available (  )  const [inline]

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

void RWUCharInputStream::close ( void   )  [inline]

Close the stream.

bool RWUCharInputStream::isBad (  )  const [inline]

Returns true to indicate a loss of integrity resulting from an input operation, such as an irrecoverable read error from a file. Throws no exceptions.

bool RWUCharInputStream::isEof (  )  const [inline]

Returns true to indicate that an input operation reached the end of an input sequence. Throws no exceptions.

bool RWUCharInputStream::isFail (  )  const [inline]

Returns true to indicate that an input operation failed to read the expected data. Throws no exceptions.

bool RWUCharInputStream::isGood (  )  const [inline]

Returns true to indicate a stream in a valid state. Throws no exceptions.

RWUCharInputStream& RWUCharInputStream::operator= ( const RWUCharInputStream handle  )  [inline]

Assignment operator. Throws no exceptions.

Parameters:
handle A UTF-16 character stream handle used to initialize this handle.
RWUCharInputStream& RWUCharInputStream::operator>> ( RWUChar unicodeValue  )  [inline]

Reads a single UTF-16 character from the stream.

Parameters:
unicodeValue The UTF-16 character to be read from the stream.
RWUCharInputStream RWUCharInputStream::operator>> ( RWUCharInputStream(*)(RWUCharInputStream &)  pf  )  [inline]

Extractor executing a manipulator function.

Parameters:
pf The manipulator's function pointer.
RWUCharInputStream& RWUCharInputStream::operator>> ( RWUCharInputStream &(*)(RWUCharInputStream &)  pf  )  [inline]

Extractor executing a manipulator function.

Parameters:
pf The manipulator's function pointer.
RWSize RWUCharInputStream::read ( RWUChar unicodeArray,
RWSize  numUChars 
) [inline]

Reads an array of UTF-16 characters from the stream. The array must be pre-allocated to contain at least numUChars elements. The function returns the actual number of UTF-16 characters extracted from the stream.

Parameters:
unicodeArray A pointer to the first element of the array.
numUChars The number of UTF-16 characters to be read from the stream.
RWUChar RWUCharInputStream::read ( void   )  [inline]

Reads a single UTF-16 character from the stream.

RWSize RWUCharInputStream::readUntil ( RWUChar unicodeArray,
RWSize  maxSize,
RWUChar  delim 
) [inline]

Reads UTF-16 characters from the 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:
unicodeArray A pointer to the array receiving the UTF-16 characters extracted from the stream.
maxSize The maximum number of UTF-16 characters to be read.
delim The UTF-16 character used as a delimiter.
RWSize RWUCharInputStream::skip ( RWSize  numUnits  )  [inline]

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

Parameters:
numUnits The number of UTF-16 characters to be skipped.

Friends And Related Function Documentation

RWUCharInputStream & rwDisc ( RWUCharInputStream stream  )  [related]

Manipulator that discards a UTF-16 character from a stream input sequence.

Parameters:
stream The UTF-16 character stream.
 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.