Module: Advanced Tools Package: Streams
RWChainedWCharArrayOutputStreamImp RWWCharArrayOutputStreamImp RWWCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase
clear() close() flush() getSinkBuff() |
getWCharacterArray() getWCharacterArraySize() isBad() isFail() |
isGood() make() RWChainedWCharArrayOutputStreamImp() write() |
~RWChainedWCharArrayOutputStreamImp() |
#include <rw/stream/RWChainedWCharArrayOutputStreamImp.h>
Concrete class implementing the wide character array output stream interface. Wide character inserted into an instance of class RWChainedWCharArrayOutputStreamImp are stored in memory using an instance of class RWChainedMemoryStreambuf. Implements the body idiom from the handle-body pattern.
RWChainedWCharArrayOutputStreamImp();
Constructor.
virtual ~RWChainedWCharArrayOutputStreamImp();
Destructor.
static RWWCharArrayOutputStream make();
Constructs an RWChainedWCharArrayOutputStreamImp instance that uses an instance of class RWChainedMemoryStreambuf to store wide characters. The function returns a handle to the implementation class.
virtual void clear();
Resets the underlying buffer.
virtual void close();
This function calls flush().
virtual void flush();
Forward the flush request to the internal RWChainedMemoryStreambuf object.
virtual wchar_t* getWCharacterArray();
Returns a pointer to an array of wide characters containing the wide characters inserted into the stream since its creation, or since the last invocation of function getWCharacterArray(), or function clear(). Users are responsible for freeing the memory associated with the array returned by this function, by using the delete[] operator.
virtual RWSize getWCharacterArraySize() const;
Returns the size of the wide character array that would be returned by a call to function getWCharacterArray().
virtual bool isBad() const;
virtual bool isFail() const;
These functions return true if the last operation performed on the internal RWChainedMemoryStreambuf object failed.
virtual bool isGood() const;
Returns true if the last operation performed on the internal RWChainedMemoryStreambuf object succeeded.
virtual void write(const wchar_t* wcharArray, RWSize numWChars);
Writes an array of wide characters to the stream. Throws exception RWIncompleteStreamOperation.
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 stream. Throws exception RWIncompleteStreamOperation.
Parameter List
wcharValue |
The wide character to be written. |
RWChainedMemoryStreambuf& getSinkBuff();
const RWChainedMemoryStreambuf& getSinkBuff() const;
These functions return a reference to the RWChainedMemoryStreambuf, which is used as the sink of wide characters.
© 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.