SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Implementation of a simple lock stream that is used with a narrow character input stream. More...
#include <rw/stream/RWSynchronizedCharInputStreamImp.h>
Public Member Functions | |
virtual void | readStringUntil (RWCString &string, char delim) |
virtual RWSize | readUntil (char *charArray, RWSize maxSize, char delim) |
Static Public Member Functions | |
static RWCharInputStream | make (const RWCharInputStream &sourceStream) |
Protected Member Functions | |
RWSynchronizedCharInputStreamImp (const RWCharInputStream &sourceStream) |
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::RWSynchronizedCharInputStreamImp | ( | const RWCharInputStream & | sourceStream | ) | [protected] |
Initializes the reference to the input stream that will be used as the source of narrow characters.
sourceStream | The input stream that will serve as the source of narrow characters. |
static RWCharInputStream RWSynchronizedCharInputStreamImp::make | ( | const RWCharInputStream & | sourceStream | ) | [inline, static] |
Constructs an RWSynchronizedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. Throws no exceptions.
sourceStream | The output stream that will serve as the source of narrow characters. |
Reimplemented from RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp >.
virtual void RWSynchronizedCharInputStreamImp::readStringUntil | ( | RWCString & | string, | |
char | delim | |||
) | [virtual] |
Reads narrow character(s) from the attached source stream until the last character read is equal to delim, or the end of the input sequence is reached. The narrow character(s) read are stored in a narrow string object.
string | A string object receiving the narrow character(s) extracted from the stream. | |
delim | The narrow character used as a delimeter. |
Reimplemented from RWFilteredCharInputStreamImp.
virtual RWSize RWSynchronizedCharInputStreamImp::readUntil | ( | char * | charArray, | |
RWSize | maxSize, | |||
char | delim | |||
) | [virtual] |
Reads narrow character(s) from the attached source stream until the last narrow character read is equal to delim, or maxSize narrow character(s) have been read, or the end of the input sequence is reached. The narrow character(s) read are stored in charArray. The function returns the actual number of narrow character(s) read from the stream.
charArray | A pointer to the array receiving the narrow character(s) extracted from the stream. | |
maxSize | The maximum number of narrow character(s) to be read. | |
delim | The narrow character value used as a delimeter. |
Reimplemented from RWFilteredCharInputStreamImp.
© 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.