Module: Advanced Tools Package: Streams
RWDataOutputStream RWHandleBase
#include <rw/stream/RWDataOutputStream.h>
Handle class for all the data output stream implementation classes. Implements the handle idiom from the handle-body pattern.
RW_EXPLICIT RWDataOutputStream(RWDataOutputStreamImp* body);
Constructor.
RWDataOutputStream(const RWDataOutputStream& handle);
Copy constructor. Throws no exceptions.
Parameter List
handle |
A data stream handle used to initialize the newly created handle. |
RWDataOutputStream& operator=(const RWDataOutputStream& handle);
Assignment operator. Throws no exceptions.
Parameter List
handle |
A data stream handle used to initialize this handle. |
RWDataOutputStream operator<<(RWDataOutputStream (*pf)(RWDataOutputStream&)); RWDataOutputStream& operator<<(RWDataOutputStream& (*pf)(RWDataOutputStream&));
These operators act as inserters, each executing a manipulator function. They throw no exceptions.
Parameter List
pf |
The manipulator's function pointer. |
RWDataOutputStream& operator<<(bool value); RWDataOutputStream& operator<<(char value); RWDataOutputStream& operator<<(double value); RWDataOutputStream& operator<<(float value); RWDataOutputStream& operator<<(int value); RWDataOutputStream& operator<<(long value); RWDataOutputStream& operator<<(long double value); RWDataOutputStream& operator<<(long long value); RWDataOutputStream& operator<<(short value); RWDataOutputStream& operator<<(signed char value); RWDataOutputStream& operator<<(unsigned char value); RWDataOutputStream& operator<<(unsigned int value); RWDataOutputStream& operator<<(unsigned long value); RWDataOutputStream& operator<<(unsigned short value); RWDataOutputStream& operator<<(wchar_t value);
These operators write a value to the stream.
Parameter List
value |
The value to be written to the stream. |
void close();
Closes the stream.
void flush();
Flushes the stream.
bool isBad() const;
Returns true to indicate a loss of integrity resulting from an output operation. Throws no exceptions.
bool isFail() const;
Returns true to indicate that an output operation failed to generate the desired data. Throws no exceptions.
bool isGood() const;
Returns true to indicate a stream in a valid state. Throws no exceptions.
void putBool(bool value); void putChar(char value); void putDouble(double value); void putFloat(float value); void putInt(int value); void putInt(int value); void putLong(long value); void putLongDouble(long double value); void putLongLong(long long value); void putShort(short value);
void putSignedChar(signed char value); virtual void void putUnsignedChar(unsigned char value); void putUnsignedInt(unsigned int value); void putUnsignedLong(unsigned long value); void putUnsignedShort(unsigned short value); void putWchar_t(wchar_t value);
These functions write a value to the stream.
Parameter List
value |
The value to be written to the stream. |
putCharacter(char value);
Writes a narrow character to the stream.
Parameter List
value |
The narrow character to be written to the stream. |
void putChars(const char* arrayPt, RWSize count);
Writes an array of char values to the stream. The chars are treated as literal numbers, not as character string.
Parameter List
arrayPt |
A pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
void putBools(const bool* arrayPt, RWSize count); void putDoubles(const double* arrayPt, RWSize count); void putFloats(const float* arrayPt, RWSize count);
void putInts(const int* arrayPt, RWSize count); void putLongs(const long* arrayPt, RWSize count); void putLongDoubles(const long double* arrayPt, RWSize count); void putLongLongs(const long long* arrayPt, RWSize count); void putShorts(const short* arrayPt, RWSize count); void putSignedChars(const signed char* arrayPt, RWSize count); void putUnsignedChars(const unsigned char* arrayPt, RWSize count); void putUnsignedInts(const unsigned int* arrayPt, RWSize count); void putUnsignedLongs(const unsigned long* arrayPt, RWSize count); void putUnsignedShorts(const unsigned short* arrayPt,
RWSize count); void putWchar_ts(const wchar_t* arrayPt, RWSize count);
These functions write an array of values to the stream.
Parameter List
arrayPt |
A pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
void putString(const char* string, RWSize count);
Writes a narrow character string, including embedded nulls, starting at string to the stream.
Parameter List
string |
A pointer to the string's first narrow character. |
count |
The number of narrow characters to be written to the stream. |
void putUString(const RWUChar* ustring, RWSize count);
Writes a UTF-16 character string, including embedded nulls, starting at ustring to the stream.
Parameter List
ustring |
A pointer to the string's first UTF-16 character. |
count |
The number of UTF-16 characters to be written to the stream. |
virtual void putUCharacter(RWUChar value);
Writes a UTF-16 character to the stream.
Parameter List
value |
The UTF-16 character to be written to the stream. |
virtual void putWCharacter(wchar_t value);
Writes a wide character to the stream.
Parameter List
value |
The wide character to be written to the stream. |
void putWString(const wchar_t* wstring, RWSize count);
Writes a wide character string, including embedded nulls, starting at wstring to the stream.
Parameter List
wstring |
A pointer to the string's first wide character. |
count |
The number of wide characters to be written to the stream. |
RWDataOutputStream& rwEndl(RWDataOutputStream& stream);
Manipulator that writes a narrow end-of-line control character to the stream.
Parameter List
stream |
The data stream to which the manipulator applies. |
RWDataOutputStream& rwEnds(RWDataOutputStream& stream);
Manipulator that writes a narrow end of string character to the stream.
Parameter List
stream |
The data stream to which the manipulator applies. |
RWDataOutputStream& rwFlush(RWDataOutputStream& stream);
Manipulator that flushes a data output stream.
Parameter List
stream |
The data stream to be flushed. |
RWDataOutputStream& rwWEndl(RWDataOutputStream& stream);
Manipulator that writes a wide end of line control character to the stream.
Parameter List
stream |
The data stream to which the manipulator applies. |
RWDataOutputStream& rwWEnds(RWDataOutputStream& stream);
Manipulator that writes a wide end of string character to the stream.
Parameter List
stream |
The data stream to which the manipulator applies. |
© 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.