Module: Advanced Tools Package: Serialization
RWDataToVirtualOutputStreamImp RWDataOutputStreamImp
#include <rw/serial/RWDataToVirtualOutputStreamImp.h>
An adapter class that allows an Essential Tools Module virtual output stream (RWvostream) to be used where a RWDataOutputStream is required. Implements the body idiom from the handle-body pattern.
// Write data to a virtual stream. #include <rw/serial/RWDataToVirtualOutputStreamImp.h> #include <rw/pstream.h> #include <iostream.h> #include <fstream.h> int main() { ofstream of; of.open("RWDataToVirtualOutputStreamImp.out", ios::out); RWpostream pstrm(of); RWDataOutputStream out = RWDataToVirtualOutputStreamImp::make(pstrm); int i = 5; out << i; return 0; }
RWDataToVirtualOutputStreamImp(RWvostream& vstrm);
Constructs an RWDataToVirtualOutputStreamImp instance that adapts the RW virtual output stream instance, vstrm to the RWDataOutputStreamImp interface. Throws no exceptions.
Parameter List
vstrm |
The virtual output stream being adapted. |
static RWDataOutputStream make(RWvostream& vstrm);
Returns an RWDataToVirtualOutputStreamImp instance that adapts the RW virtual output stream instance, vstrm to the RWDataOutputStreamImp interface. Throws no exceptions.
Parameter List
vstrm |
The virtual output stream being adapted. |
virtual void putBools(const bool* arrayPt, RWSize count);
Writes an array of bool values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putBool(bool value);
Writes a bool value to the stream.
Parameter List
value |
The bool value to be written to the stream. |
virtual void putCharacter(char value);
Writes a TinyCharacter value to the stream.
Parameter List
value |
The TinyCharacter value to be written to the stream. |
virtual void putChars(const char* arrayPt, RWSize count);
Writes an array of char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putChar(char value);
Writes a char value to the stream.
Parameter List
value |
The char value to be written to the stream. |
virtual void putDoubles(const double* arrayPt, RWSize count);
Writes an array of double values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putDouble(double value);
Writes a double value to the stream.
Parameter List
value |
The double value to be written to the stream. |
virtual void putFloats(const float* arrayPt, RWSize count);
Writes an array of float values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putFloat(float value);
Writes a float value to the stream.
Parameter List
value |
The float value to be written to the stream. |
virtual void putInts(const int* arrayPt, RWSize count);
Writes an array of int values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putInt(int value);
Writes an int value to the stream.
Parameter List
value |
The int value to be written to the stream. |
virtual void putLongDoubles(const long double* arrayPt, RWSize count);
Writes an array of long double values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putLongDouble(long double value);
Writes a long double value to the stream.
Parameter List
value |
is the long double value to be written to the stream. |
virtual void putLongLongs(const long long* arrayPt, RWSize count);
Writes an array of long long values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putLongLong(long long value);
Writes a long long value to the stream.
Parameter List
value |
The long long value to be written to the stream. |
virtual void putLongs(const long* arrayPt, RWSize count);
Writes an array of long values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putLong(long value);
Writes a long value to the stream.
Parameter List
value |
The long value to be written to the stream. |
virtual void putShorts(const short* arrayPt, RWSize count);
Writes an array of short values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putShort(short value);
Writes a short value to the stream.
Parameter List
value |
The short value to be written to the stream. |
virtual void putSignedChars(const signed char* arrayPt, RWSize count);
Writes an array of signed char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putSignedChar(signed char value);
Writes a signed char value to the stream.
Parameter List
value |
The signed char value to be written to the stream. |
virtual void putString(const char* arrayPt, RWSize count);
Writes an array of char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUCharacter(RWUChar value);
Writes a UnicodeCharacter value to the stream.
Parameter List
value |
The UnicodeCharacter value to be written to the stream. |
virtual void putUString(const unsigned short* arrayPt, RWSize count);
Writes an array of char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUnsignedChars(const unsigned char* arrayPt, RWSize count);
Writes an array of unsigned char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUnsignedChar(unsigned char value);
Writes an unsigned char value to the stream.
Parameter List
value |
The unsigned char value to be written to the stream. |
virtual void putUnsignedInts(const unsigned int* arrayPt, RWSize count);
Writes an array of unsigned int values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUnsignedInt(unsigned int value);
Writes an unsigned int value to the stream.
Parameter List
value |
The unsigned int value to be written to the stream. |
virtual void putUnsignedLongs(const unsigned long* arrayPt, RWSize count);
Writes an array of unsigned long values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUnsignedLong(unsigned long value);
Writes an unsigned long value to the stream.
Parameter List
value |
The unsigned long value to be written to the stream. |
virtual void putUnsignedShorts(const unsigned short* arrayPt,
RWSize count);
Writes an array of unsigned short values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putUnsignedShort(unsigned short value);
Writes an unsigned short value to the stream.
Parameter List
value |
The unsigned short value to be written to the stream. |
virtual void putWCharacter(wchar_t value);
Writes a WideCharacter value to the stream.
Parameter List
value |
The WideCharacter value to be written to the stream. |
virtual void putWString(const wchar_t* arrayPt, RWSize count);
Writes an array of char values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putWchar_ts(const wchar_t* arrayPt, RWSize count);
Writes an array of wchar_t values to the stream.
Parameter List
arrayPt |
Pointer to the array's first element. |
count |
The number of elements to be written to the stream. |
virtual void putWchar_t(wchar_t value);
Writes a wchar_t value to the stream.
Parameter List
value |
The wchar_t value to be written to the stream. |
virtual ~RWDataToVirtualOutputStreamImp();
Virtual destructor.
© 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.