SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Handle class for all narrow character input stream implementation classes. More...
#include <rw/stream/RWCharInputStream.h>
Public Member Functions | |
RWCharInputStream (RWCharInputStreamImp *ptr) | |
RWCharInputStream (const RWCharInputStream &handle) | |
RWSize | available () const |
void | close () |
bool | isBad () const |
bool | isEof () const |
bool | isFail () const |
bool | isGood () const |
RWCharInputStream & | operator= (const RWCharInputStream &handle) |
RWCharInputStream & | operator>> (RWCharInputStream &(*pf)(RWCharInputStream &)) |
RWCharInputStream | operator>> (RWCharInputStream(*pf)(RWCharInputStream &)) |
RWCharInputStream & | operator>> (char &charValue) |
char | read () |
RWSize | read (char *charArray, RWSize numChars) |
void | readStringUntil (RWCString &string, char delim= ' ') |
RWSize | readUntil (char *charArray, RWSize maxSize, char delim) |
RWSize | skip (RWSize numUnits) |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator< (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
Related Functions | |
(Note that these are not member functions.) | |
RWCharInputStream & | rwDisc (RWCharInputStream &stream) |
RWCharInputStream | rwGuard (RWCharInputStream &stream) |
Additional Inherited Members | |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (void) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (const RWHandleBase &second) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
Handle class for all the narrow character input stream implementation classes. Implements the handle idiom from the handle-body pattern.
|
inlineexplicit |
Constructor.
|
inline |
Copy constructor.
handle | A narrow stream handle used to initialize the newly created handle. |
|
inline |
Returns the number of narrow characters that can be read from the attached source stream without blocking. Throws no exceptions.
|
inline |
Closes the stream.
|
inline |
Returns true
to indicate a loss of integrity resulting from an input, such as an irrecoverable read error from a file.
|
inline |
Returns true
to indicate that an input operation reached the end of an input sequence.
|
inline |
Returns true
to indicate that an input operation failed to read the expected data.
|
inline |
Returns true
to indicate a stream in a valid state.
|
inline |
Assignment operator. Throws no exceptions.
handle | A narrow stream handle used to initialize this handle. |
|
inline |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
|
inline |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
|
inline |
Reads a single narrow character from the stream.
charValue | The narrow character to be read from the stream. |
|
inline |
Reads a single narrow character from the stream.
Reads an array of narrow characters from the stream. The array must be pre-allocated to contain at list numChars elements. The function returns the actual number of narrow characters read from the stream.
charArray | A pointer to the first element of the array. |
numChars | The number of narrow characters to be read from the stream. |
|
inline |
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 delimiter. |
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 delimiter. |
Skips numUnits narrow characters from the input sequence if possible. The function returns the actual number of narrow characters skipped, which can be any value between 0 and numUnits.
numUnits | The number of narrow characters to be skipped. |
|
related |
Manipulator that discards a narrow character from a stream input sequence.
stream | The narrow character stream. |
|
related |
Manipulator that is used to guard a series of extraction operations.
stream | A narrow character input stream. |
A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |