SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Writes data in US-ASCII format to a narrow character stream. More...
#include <rw/stream/RWOstreamDataToCharOutputStreamImp.h>
Public Member Functions | |
virtual | ~RWOstreamDataToCharOutputStreamImp () |
virtual void | close () |
virtual void | flush () |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
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 | putLongLong (long long value) |
virtual void | putUnsignedLongLong (unsigned long long value) |
virtual void | putLongDouble (long double value) |
virtual void | putCharacter (char value) |
virtual void | putWCharacter (wchar_t value) |
virtual void | putUCharacter (RWUChar value) |
virtual void | putSizeT (size_t 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 | putLongLongs (const long long *arrayPt, RWSize count) |
virtual void | putUnsignedLongLongs (const unsigned long long *arrayPt, RWSize count) |
virtual void | putLongDoubles (const long double *arrayPt, RWSize count) |
virtual void | putString (const char *string, RWSize count) |
virtual void | putWString (const wchar_t *wstring, RWSize count) |
virtual void | putUString (const RWUChar *ustring, RWSize count) |
Static Public Member Functions | |
static RWDataOutputStream | make (const RWCharOutputStream &sink) |
static RWDataOutputStream | make (const RWCharOutputStream &sink, std::ios *&formatter) |
Protected Member Functions | |
RWOstreamDataToCharOutputStreamImp (const RWCharOutputStream &sinkStream) | |
RWOstreamDataToCharOutputStreamImp (const RWCharOutputStream &sinkStream, std::ios *&formatter) | |
std::ostream & | getOstream () |
const std::ostream & | getOstream () const |
std::ostream & | getCheckedOstream () |
const std::ostream & | getCheckedOstream () const |
std::ios & | getIos () |
The class RWOstreamDataToCharOutputStreamImp writes data in US-ASCII format to a narrow character stream. The format generated is equivalent to the format generated by the iostreams std::ostream class. Implements the body idiom from the handle-body pattern.
virtual RWOstreamDataToCharOutputStreamImp::~RWOstreamDataToCharOutputStreamImp | ( | ) | [virtual] |
Destructor.
RWOstreamDataToCharOutputStreamImp::RWOstreamDataToCharOutputStreamImp | ( | const RWCharOutputStream & | sinkStream | ) | [protected] |
Initializes the reference to the narrow character stream that will be used as the character sink.
sinkStream | The narrow character stream that will serve as the character sink. |
RWOstreamDataToCharOutputStreamImp::RWOstreamDataToCharOutputStreamImp | ( | const RWCharOutputStream & | sinkStream, | |
std::ios *& | formatter | |||
) | [protected] |
Initializes the reference to the narrow character stream that will be used as the character sink.
sinkStream | The narrow character stream that will serve as the sink of characters. | |
formatter | An object that can be used to modify the format generated by the stream. This object is initialized by the stream, and then returned to the caller. |
virtual void RWOstreamDataToCharOutputStreamImp::close | ( | ) | [virtual] |
Flushes the embedded iostreams std::ostream object and then forwards the closed call to the next processing narrow character output stream.
Reimplemented from RWDataToCharOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::flush | ( | ) | [virtual] |
Flushes the embedded iostreams std::ostream object.
Reimplemented from RWDataToCharOutputStreamImp.
const std::ostream& RWOstreamDataToCharOutputStreamImp::getCheckedOstream | ( | ) | const [protected] |
Returns the embedded iostreams std::ostream object that is used to format data.
RWExternalStreamException | Thrown when the call to the embedded std::ostream object used to format data is in a bad or fail state. |
std::ostream& RWOstreamDataToCharOutputStreamImp::getCheckedOstream | ( | ) | [protected] |
Returns the embedded iostreams std::ostream object that is used to format data.
RWExternalStreamException | Thrown when the call to the embedded std::ostream object used to format data is in a bad or fail state. |
std::ios& RWOstreamDataToCharOutputStreamImp::getIos | ( | ) | [inline, protected] |
Returns a reference to the std::ios base class of the embedded std::ostream object, used to format the data inserted in this output stream object. The std::ios reference can then be used to modify the format flags used by the embedded std::ostream object when generating the formatted US-ASCII representation of the data inserted in this output stream.
const std::ostream& RWOstreamDataToCharOutputStreamImp::getOstream | ( | ) | const [inline, protected] |
Returns the embedded iostreams std::ostream object that is used to format data. Throws no exceptions.
std::ostream& RWOstreamDataToCharOutputStreamImp::getOstream | ( | ) | [inline, protected] |
Returns the embedded iostreams std::ostream object that is used to format data. Throws no exceptions.
virtual bool RWOstreamDataToCharOutputStreamImp::isBad | ( | ) | const [virtual] |
Returns true
if either one of the embedded iostreams std::ostream objects or the next processing narrow character output stream object is in a bad state. Throws no exceptions.
Reimplemented from RWDataToCharOutputStreamImp.
virtual bool RWOstreamDataToCharOutputStreamImp::isFail | ( | ) | const [virtual] |
Returns true
if either one of the embedded iostreams std::ostream objects or the next processing narrow character output stream object is in a failed state. Throws no exceptions.
Reimplemented from RWDataToCharOutputStreamImp.
virtual bool RWOstreamDataToCharOutputStreamImp::isGood | ( | ) | const [virtual] |
Returns true
if both the embedded iostreams std::ostream object and the next processing narrow character output stream object are in a good state. Throws no exceptions.
Reimplemented from RWDataToCharOutputStreamImp.
static RWDataOutputStream RWOstreamDataToCharOutputStreamImp::make | ( | const RWCharOutputStream & | sink, | |
std::ios *& | formatter | |||
) | [inline, static] |
Constructs an RWOstreamDataToCharOutputStreamImp instance that uses sink as its sink of narrow characters and returns a handle to it. Throws no exceptions.
sink | The narrow character stream that is used as the character sink. | |
formatter | An object that can be used to modify the format generated by the stream. This object is initialized by the stream, and then returned to the caller. |
static RWDataOutputStream RWOstreamDataToCharOutputStreamImp::make | ( | const RWCharOutputStream & | sink | ) | [inline, static] |
Constructs an RWOstreamDataToCharOutputStreamImp instance that uses sink as its sink of narrow characters and returns a handle to it. Throws no exceptions.
sink | The narrow character stream that is used as the character sink. |
virtual void RWOstreamDataToCharOutputStreamImp::putBool | ( | bool | value | ) | [virtual] |
Writes a bool
value to the narrow character stream, used as the data sink.
value | The bool value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putBools | ( | const bool * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of bool
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putChar | ( | char | value | ) | [virtual] |
Writes a char
value to the narrow character stream, used as the data sink.
value | The char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putCharacter | ( | char | value | ) | [virtual] |
Writes a narrow character to the narrow character stream that is used as the data sink.
value | The narrow character to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putChars | ( | const char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of char
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putDouble | ( | double | value | ) | [virtual] |
Writes a double
value to the narrow character stream, used as the data sink.
value | The double value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putDoubles | ( | const double * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of double
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putFloat | ( | float | value | ) | [virtual] |
Writes a float
value to the narrow character stream, used as the data sink.
value | The float value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putFloats | ( | const float * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of float
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putInt | ( | int | value | ) | [virtual] |
Writes a int
value to the narrow character stream, used as the data sink.
value | The int value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putInts | ( | const int * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of int
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLong | ( | long | value | ) | [virtual] |
Writes a long
value to the narrow character stream, used as the data sink.
value | The long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLongDouble | ( | long double | value | ) | [virtual] |
Writes a long double
value to the narrow character stream, used as the data sink.
value | The long double value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLongDoubles | ( | const long double * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of long double
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLongLong | ( | long long | value | ) | [virtual] |
Writes a long long
value to the narrow character stream, used as the data sink.
value | The long long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLongLongs | ( | const long long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of long long
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putLongs | ( | const long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of long
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putShort | ( | short | value | ) | [virtual] |
Writes a short
value to the narrow character stream, used as the data sink.
value | The short value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putShorts | ( | const short * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of short
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putSignedChar | ( | signed char | value | ) | [virtual] |
Writes a signed char
value to the narrow character stream, used as the data sink.
value | The signed char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putSignedChars | ( | const signed char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of signed char
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putSizeT | ( | size_t | value | ) | [virtual] |
Writes a size_t
character to the narrow character stream, used as the data sink.
value | The size_t character to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putString | ( | const char * | string, | |
RWSize | count | |||
) | [virtual] |
Writes a narrow character string to the narrow character stream, used as the data sink.
string | A pointer to the string's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUCharacter | ( | RWUChar | value | ) | [virtual] |
Writes a UTF-16 character to the narrow character stream, used as the data sink.
value | The UTF-16 character to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedChar | ( | unsigned char | value | ) | [virtual] |
Writes a unsigned char
value to the narrow character stream, used as the data sink.
value | The unsigned char value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedChars | ( | const unsigned char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of unsigned char
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedInt | ( | unsigned int | value | ) | [virtual] |
Writes a unsigned int
value to the narrow character stream, used as the data sink.
value | The unsigned int value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedInts | ( | const unsigned int * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of unsigned int
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedLong | ( | unsigned long | value | ) | [virtual] |
Writes a unsigned long
value to the narrow character stream, used as the data sink.
value | The unsigned long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedLongLong | ( | unsigned long long | value | ) | [virtual] |
Writes an unsigned long long
value to the narrow character stream, used as the data sink.
value | The unsigned long long value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedLongLongs | ( | const unsigned long long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of unsigned long long
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedLongs | ( | const unsigned long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of unsigned long
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedShort | ( | unsigned short | value | ) | [virtual] |
Writes a unsigned short
value to the narrow character stream, used as the data sink.
value | The unsigned short value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUnsignedShorts | ( | const unsigned short * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of unsigned short
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putUString | ( | const RWUChar * | ustring, | |
RWSize | count | |||
) | [virtual] |
Writes a UTF-16 character string to the narrow character stream, used as the data sink.
ustring | A pointer to the string's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putWchar_t | ( | wchar_t | value | ) | [virtual] |
Writes a wchar_t
value to the narrow character stream, used as the data sink.
value | The wchar_t value to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putWchar_ts | ( | const wchar_t * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Writes an array of wchar_t
values to the narrow character stream, used as the data sink.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putWCharacter | ( | wchar_t | value | ) | [virtual] |
Writes a wide character to the narrow character stream, used as the data sink.
value | The wide character to be written to the stream. |
Implements RWDataOutputStreamImp.
virtual void RWOstreamDataToCharOutputStreamImp::putWString | ( | const wchar_t * | wstring, | |
RWSize | count | |||
) | [virtual] |
Writes a wide character string to the narrow character stream, used as the data sink.
wstring | A pointer to the string's first element. | |
count | The number of elements 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.