SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Adapter class that allows virtual output stream class RWvostream to be used where data output stream class RWDataOutputStream is required. More...
#include <rw/serial/RWDataToVirtualOutputStreamImp.h>
Public Member Functions | |
virtual bool | isFail () const |
virtual bool | isBad () const |
virtual bool | isGood () const |
virtual void | flush () |
virtual void | putBool (bool value) |
virtual void | putChar (char value) |
virtual void | putUnsignedChar (unsigned char value) |
virtual void | putSignedChar (signed char value) |
virtual void | putShort (short value) |
virtual void | putUnsignedShort (unsigned short value) |
virtual void | putInt (int value) |
virtual void | putUnsignedInt (unsigned int value) |
virtual void | putLong (long value) |
virtual void | putUnsignedLong (unsigned long value) |
virtual void | putFloat (float value) |
virtual void | putDouble (double value) |
virtual void | putWchar_t (wchar_t value) |
virtual void | putCharacter (char value) |
virtual void | putWCharacter (wchar_t value) |
virtual void | putUCharacter (RWUChar value) |
virtual void | putLongLong (long long value) |
virtual void | putLongDouble (long double value) |
virtual void | putBools (const bool *arrayPt, RWSize count) |
virtual void | putChars (const char *arrayPt, RWSize count) |
virtual void | putUnsignedChars (const unsigned char *arrayPt, RWSize count) |
virtual void | putSignedChars (const signed char *arrayPt, RWSize count) |
virtual void | putShorts (const short *arrayPt, RWSize count) |
virtual void | putUnsignedShorts (const unsigned short *arrayPt, RWSize count) |
virtual void | putInts (const int *arrayPt, RWSize count) |
virtual void | putUnsignedInts (const unsigned int *arrayPt, RWSize count) |
virtual void | putLongs (const long *arrayPt, RWSize count) |
virtual void | putUnsignedLongs (const unsigned long *arrayPt, RWSize count) |
virtual void | putFloats (const float *arrayPt, RWSize count) |
virtual void | putDoubles (const double *arrayPt, RWSize count) |
virtual void | putWchar_ts (const wchar_t *arrayPt, RWSize count) |
virtual void | putString (const char *arrayPt, RWSize count) |
virtual void | putWString (const wchar_t *arrayPt, RWSize count) |
virtual void | putUString (const unsigned short *arrayPt, RWSize count) |
virtual void | putLongLongs (const long long *arrayPt, RWSize count) |
virtual void | putLongDoubles (const long double *arrayPt, RWSize count) |
Static Public Member Functions | |
static RWDataOutputStream | make (RWvostream &vstrm) |
Protected Member Functions | |
RWDataToVirtualOutputStreamImp (RWvostream &vstrm) |
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::RWDataToVirtualOutputStreamImp | ( | RWvostream & | vstrm | ) | [inline, protected] |
Constructs an RWDataToVirtualOutputStreamImp instance that adapts the RW virtual output stream instance, vstrm to the RWDataOutputStreamImp interface. Throws no exceptions.
vstrm | The virtual output stream being adapted. |
virtual void RWDataToVirtualOutputStreamImp::flush | ( | ) | [inline, virtual] |
Flushes the stream.
Implements RWOutputStreamImp.
virtual bool RWDataToVirtualOutputStreamImp::isBad | ( | ) | const [inline, virtual] |
Returns true
to indicate a loss of integrity resulting from an input or output operation, such as an irrecoverable read error from a file. Throws no exceptions.
Implements RWStreamImp.
virtual bool RWDataToVirtualOutputStreamImp::isFail | ( | ) | const [inline, virtual] |
Returns true
to indicate that an input operation failed to read the expected data, or that an output operation failed to generate the desired data. Throws no exceptions.
Implements RWStreamImp.
virtual bool RWDataToVirtualOutputStreamImp::isGood | ( | ) | const [inline, virtual] |
Returns true
to indicate a stream in a valid state. Throws no exceptions.
Implements RWStreamImp.
static RWDataOutputStream RWDataToVirtualOutputStreamImp::make | ( | RWvostream & | vstrm | ) | [inline, static] |
Returns an RWDataToVirtualOutputStreamImp instance that adapts the RW virtual output stream instance, vstrm to the RWDataOutputStreamImp interface. Throws no exceptions.
vstrm | The virtual output stream being adapted. |
virtual void RWDataToVirtualOutputStreamImp::putBool | ( | bool | value | ) | [inline, virtual] |
Writes a bool
value to the stream.
value | The bool value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putBools | ( | const bool * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of bool
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putChar | ( | char | value | ) | [inline, virtual] |
Writes a char
value to the stream.
value | The char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putCharacter | ( | char | value | ) | [inline, virtual] |
Writes a TinyCharacter
value to the stream.
value | The TinyCharacter value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putChars | ( | const char * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putDouble | ( | double | value | ) | [inline, virtual] |
Writes a double
value to the stream.
value | The double value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putDoubles | ( | const double * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of double
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putFloat | ( | float | value | ) | [inline, virtual] |
Writes a float
value to the stream.
value | The float value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putFloats | ( | const float * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of float
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putInt | ( | int | value | ) | [inline, virtual] |
Writes an int
value to the stream.
value | The int value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putInts | ( | const int * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of int
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLong | ( | long | value | ) | [inline, virtual] |
Writes a long
value to the stream.
value | The long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLongDouble | ( | long double | value | ) | [inline, virtual] |
Writes a long double
value to the stream.
value | The long double value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLongDoubles | ( | const long double * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of long
double
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLongLong | ( | long long | value | ) | [inline, virtual] |
Writes a long long
value to the stream.
value | The long long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLongLongs | ( | const long long * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of long
long
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putLongs | ( | const long * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of long
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putShort | ( | short | value | ) | [inline, virtual] |
Writes a short
value to the stream.
value | The short value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putShorts | ( | const short * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of short
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putSignedChar | ( | signed char | value | ) | [inline, virtual] |
Writes a signed
char
value to the stream.
value | The signed char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putSignedChars | ( | const signed char * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of signed
char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putString | ( | const char * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUCharacter | ( | RWUChar | value | ) | [inline, virtual] |
Writes a UnicodeCharacter
value to the stream.
value | The UnicodeCharacter value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedChar | ( | unsigned char | value | ) | [inline, virtual] |
Writes an unsigned char
value to the stream.
value | The unsigned char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedChars | ( | const unsigned char * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of unsigned
char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedInt | ( | unsigned int | value | ) | [inline, virtual] |
Writes an unsigned
int
value to the stream.
value | The unsigned int value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedInts | ( | const unsigned int * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of unsigned
int
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedLong | ( | unsigned long | value | ) | [inline, virtual] |
Writes an unsigned long
value to the stream.
value | The unsigned long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedLongs | ( | const unsigned long * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of unsigned
long
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedShort | ( | unsigned short | value | ) | [inline, virtual] |
Writes an unsigned short
value to the stream.
value | The unsigned short value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUnsignedShorts | ( | const unsigned short * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of unsigned
short
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putUString | ( | const unsigned short * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putWchar_t | ( | wchar_t | value | ) | [inline, virtual] |
Writes a wchar_t
value to the stream.
value | The wchar_t value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putWchar_ts | ( | const wchar_t * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of wchar_t
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putWCharacter | ( | wchar_t | value | ) | [inline, virtual] |
Writes a WideCharacter
value to the stream.
value | The WideCharacter value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWDataToVirtualOutputStreamImp::putWString | ( | const wchar_t * | arrayPt, | |
RWSize | count | |||
) | [inline, virtual] |
Writes an array of char
values to the stream.
arrayPt | Pointer to the array's first element. | |
count | The number of element(s) to be written to the stream. |
Implements RWDataOutputStreamImp.
© 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.