Module: Advanced Tools Package: Streams
RWWCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase
#include <rw/stream/RWWCharInputStreamImp.h>
Abstract base class for all the wide character input stream implementation classes. Implements the body idiom from the handle-body pattern.
RWWCharInputStreamImp();
Constructor.
virtual ~RWWCharInputStreamImp();
Destructor.
virtual RWWCharInputStream acquire();
Acquires the synchronization mechanism provided by a stream concrete implementation. The acquire() member function returns a handle to the wide character stream that should be used for input operation after acquiring the synchronization mechanism.
virtual wchar_t read() =0;
Reads a single wide character from the stream.
virtual RWSize read(wchar_t* wcharArray, RWSize numWChars) =0;
Reads an array of wide characters from the stream. The array must be pre-allocated to contain at list numWChars elements. The function returns the actual number of wide characters read from the stream.
Parameter List
wcharArray |
A pointer to the first element of the array. |
numWChars |
The number of wide characters to be read from the stream. |
virtual RWSize readUntil(wchar_t* wcharArray, RWSize maxSize, wchar_t delim) =0;
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 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. |
virtual void release();
Releases the synchronization mechanism provided by a stream concrete implementation.
© 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.