Module: Advanced Tools Package: Streams
RWSynchronizedCharInputStreamImp RWTInputStreamLockImp<RWCharInputStream, RWFilteredCharInputStreamImp>
#include <rw/stream/RWSynchronizedCharInputStreamImp.h>
Class RWSynchronizedCharInputStreamImp implements a simple lock stream that is used with narrow 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.
RWSynchronizedCharInputStreamImp(RWCharInputStream&
sourceStream);
Initializes the reference to the input stream that will be used as the source of narrow characters.
Parameter List
sourceStream |
The input stream that will serve as the source of narrow characters. |
static RWCharInputStream make(RWCharInputStream& sourceStream);
Constructs an RWSynchronizedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. Throws no exceptions.
Parameter List
sourceStream |
The output stream that will serve as the source of narrow characters. |
virtual void readUntil(RWCString& string, char delim);
Reads narrow characters from the stream until the last narrow character read is equal to delim, or the end of the input sequence is reached. The narrow characters read are stored in a string object.
Parameter List
string |
The string object receiving the characters extracted from the stream. |
delim |
The narrow 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.