Module: Advanced Tools Package: Streams
RWWCharToWStreambufOutputStreamImp RWWCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase
close() flush() getSinkBuff() |
isBad() isFail() isGood() |
make() RWWCharToWStreambufOutputStreamImp() write() |
~RWWCharToWStreambufOutputStreamImp() |
#include <rw/stream/RWWCharToWStreambufOutputStreamImp.h>
Concrete class connecting a wide character stream, to an iostreams wide character buffer. The iostreams buffer is used as sink for the wide characters written to the wide character stream. Implements the body idiom from the handle-body pattern.
NOTE -- This class is available only when you build the Streams package using the Standard C++ iostreams library.
RWWCharToWStreambufOutputStreamImp(wstreambuf& sinkBuff);
Initializes the reference to the iostreams wstreambuf, that will be used as the sink of wide characters.
Parameter List
sinkBuff |
The iostreams std::streambuf that will serve as the sink of wide characters. |
virtual ~RWWCharToWStreambufOutputStreamImp();
Destructor.
static RWWCharOutputStream make(wstreambuf& sink);
Constructs an RWWCharToWStreambufOutputStreamImp instance that uses sink as its sink of wide characters, and returns a handle to it. Throws no exceptions.
Parameter List
sink |
The iostreams wstreambuf that is used as the sink of wide characters. |
virtual void close();
This function calls flush(). The user is responsible for closing the iostreams wstreambuf used as the sink of wide characters if necessary.
virtual void flush();
Forward the flush() request to the iostreams wstreambuf.
virtual bool isBad() const;
Returns true if the last operation performed on the iostreams wstreambuf failed. Throws no exceptions.
virtual bool isFail() const;
Returns true if the last operation performed on the iostreams wstreambuf failed. Throws no exceptions.
virtual bool isGood() const;
Returns true if the last operation performed on the iostreams wstreambuf succeeded. Throws no exceptions.
virtual void write(const wchar_t* wcharArray, RWSize numWChars);
Writes an array of wide characters to the iostreams wstreambuf.
Parameter List
wcharArray |
A pointer to the first element of the array. |
numWChars |
The number of wide characters to be written. |
virtual void write(wchar_t wcharValue);
Writes a single wide character to the iostreams wstreambuf.
Parameter List
wcharValue |
The wide character to be written. |
wstreambuf& getSinkBuff(); const wstreambuf& getSinkBuff() const;
These functions return a reference to the iostreams std::streambuf, used as the sink of wide characters. They throw no exceptions.
© 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.