SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Implementation of a simple lock stream that can be used with a wide character input stream. More...
#include <rw/stream/RWSynchronizedWCharInputStreamImp.h>
Public Member Functions | |
virtual RWSize | readUntil (wchar_t *wcharArray, RWSize maxSize, wchar_t delim) |
Static Public Member Functions | |
static RWWCharInputStream | make (const RWWCharInputStream &sourceStream) |
Protected Member Functions | |
RWSynchronizedWCharInputStreamImp (const RWWCharInputStream &sourceStream) |
Class RWSynchronizedWCharInputStreamImp implements a simple lock stream that is used with wide character input stream. The stream locks its internal synchronization mechanism before forwarding input requests to its associated source stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.
RWSynchronizedWCharInputStreamImp::RWSynchronizedWCharInputStreamImp | ( | const RWWCharInputStream & | sourceStream | ) | [protected] |
Initializes the reference to the input stream that will be used as the source of wide characters.
sourceStream | The input stream that will serve as the source of wide characters. |
static RWWCharInputStream RWSynchronizedWCharInputStreamImp::make | ( | const RWWCharInputStream & | sourceStream | ) | [inline, static] |
Constructs an RWSynchronizedWCharInputStreamImp instance that uses sourceStream as its source of wide characters, and returns a handle to it. Throws no exceptions.
sourceStream | The output stream that will serve as the source of wide characters. |
Reimplemented from RWTInputStreamLockImp< RWWCharInputStream, RWFilteredWCharInputStreamImp >.
virtual RWSize RWSynchronizedWCharInputStreamImp::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.
wcharArray | A pointer to the array receiving the wide character(s) extracted from the stream. | |
maxSize | The maximum number of wide character(s) to be read. | |
delim | The wide character used as a delimeter. |
Reimplemented from RWFilteredWCharInputStreamImp.
© 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.