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