Module: Advanced Tools Package: Streams
RWvostreamToDataOutputStream RWvostream
bad() clear() eof() fail() |
flush() getSinkStream() good() operator<<() |
put() putString() rdstate() RWvostreamToDataOutputStream() |
~RWvostreamToDataOutputStream() |
#include <rw/stream/RWvostreamToDataOutputStream.h>
The class RWvostreamToDataOutputStream is an adaptor class that adapts the Rogue Wave virtual stream interface to the new Rogue Wave data output stream interface. Requests made through the Rogue Wave virtual output stream interface are forwarded to the embedded RWDataOutputStream handle.
RWvostreamToDataOutputStream(RWDataOutputStream& sinkStream);
Initializes the reference to the data stream that will be used as the sink of data.
Parameter List
sinkStream |
The data stream that will serve as the sink of data. |
virtual ~RWvostreamToDataOutputStream();
Destructor.
virtual RWvostream& operator<<(char value);
Writes a narrow character to the embedded data stream.
Parameter List
value |
The narrow character to be written. |
virtual RWvostream& operator<<(const char* string);
Writes a null terminated narrow character string to the embedded data stream.
Parameter List
string |
A pointer to the string's first element. |
virtual RWvostream& operator<<(double value);
Parameter List
value |
The double value to be written. |
virtual RWvostream& operator<<(float value); virtual RWvostream& operator<<(int value); virtual RWvostream& operator<<(long value); virtual RWvostream& operator<<(short value); virtual RWvostream& operator<<(unsigned int value); virtual RWvostream& operator<<(unsigned long value); virtual RWvostream& operator<<(unsigned short value);
These operator functions write a value to the embedded data stream.
Parameter List
value |
The value to be written. |
virtual RWvostream& operator<<(unsigned char value);
Writes an unsigned char value to the embedded data stream as a narrow character.
Parameter List
value |
The unsigned char value to be written. |
virtual RWvostream& operator<<(wchar_t value);
Writes a wide character to the embedded data stream.
Parameter List
value |
The wide character to be written. |
virtual int bad();
Forward to the isBad() function of the embedded data stream. Throws no exceptions.
virtual void clear(int v=0);
Not meaningful for data output stream. This function does nothing. Throws no exceptions.
virtual int eof();
Not meaningful for data output stream. This function always returns 0. Throws no exceptions.
virtual int fail();
Forward to the isFail() function of the embedded data stream. Throws no exceptions.
virtual RWvostream& flush();
Forwards the flush() request to the embedded data stream.
virtual int good();
Forward to the isGood() function of the embedded data stream. Throws no exceptions.
virtual RWvostream& put(const bool* arrayPt, size_t count); virtual RWvostream& put(const char* arrayPt, size_t count); virtual RWvostream& put(const double* arrayPt, size_t count); virtual RWvostream& put(const float* arrayPt, size_t count); virtual RWvostream& put(const int* arrayPt, size_t count); virtual RWvostream& put(const long* arrayPt, size_t count); virtual RWvostream& put(const short* arrayPt, size_t count); virtual RWvostream& put(const unsigned char* arrayPt, size_t count); virtual RWvostream& put(const unsigned int* arrayPt, size_t count); virtual RWvostream& put(const unsigned long* arrayPt, size_t count); virtual RWvostream& put(const unsigned short* arrayPt, size_t count); virtual RWvostream& put(const wchar_t* arrayPt, size_t count);
These functions write an array of values to the embedded data stream.
Parameter List
arrayPt |
A pointer to the array's first element. |
count |
The number of elements to be written. |
virtual RWvostream& put(char value); virtual RWvostream& put(bool value); virtual RWvostream& put(unsigned char value); virtual RWvostream& put(wchar_t value);
These functions write a value to the embedded data stream.
Parameter List
value |
The value to be written. |
virtual RWvostream& putString(const char* string, size_t count);
Writes a narrow character string to the embedded data stream.
Parameter List
string |
A pointer to the string's first element. |
count |
The number of elements to be written. |
virtual int rdstate();
Returns the value of the stream state variable as defined in iostreams. Throws no exceptions.
RWDataOutputStream& getSinkStream(); const RWDataOutputStream& getSinkStream() const;
These functions return a handle to the embedded data output stream that is used as the sink of data. 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.