Module: Advanced Tools Package: Streams
RWSynchronizedWCharInputStreamImp RWTInputStreamLockImp<RWWCharInputStream, RWFilteredWCharInputStreamImp>
#include <rw/stream/RWSynchronizedWCharInputStreamImp.h>
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(RWWCharInputStream&
sourceStream);
Initializes the reference to the input stream that will be used as the source of wide characters.
Parameter List
sourceStream |
The input stream that will serve as the source of wide characters. |
static RWWCharInputStream make(RWWCharInputStream& sourceStream);
Constructs an RWSynchronizedWCharInputStreamImp instance that uses sourceStream as its source of wide characters, and returns a handle to it. Throws no exceptions.
Parameter List
sourceStream |
The output stream that will serve as the source of wide characters. |
virtual RWSize readUntil(wchar_t* wcharArray, RWSize maxSize, wchar_t delim);
Reads wide characters from the 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(s) read from the stream.
Parameter List
wcharArray |
A pointer to the array receiving the wide characters extracted from the stream. |
maxSize |
The maximum number of wide characters to be read. |
delim |
The wide character used as a delimiter. |
© 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.