SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Related Functions
RWDataOutputStream Class Reference

Handle class for all the data output stream implementation classes. More...

#include <rw/stream/RWDataOutputStream.h>

Inheritance diagram for RWDataOutputStream:
RWHandleBase RWObjectOutputStream

Public Member Functions

 RWDataOutputStream (RWDataOutputStreamImp *ptr)
 
 RWDataOutputStream (const RWDataOutputStream &handle)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWDataOutputStreamoperator<< (RWDataOutputStream &(*pf)(RWDataOutputStream &))
 
RWDataOutputStream operator<< (RWDataOutputStream(*pf)(RWDataOutputStream &))
 
RWDataOutputStreamoperator<< (bool value)
 
RWDataOutputStreamoperator<< (char value)
 
RWDataOutputStreamoperator<< (unsigned char value)
 
RWDataOutputStreamoperator<< (signed char value)
 
RWDataOutputStreamoperator<< (short value)
 
RWDataOutputStreamoperator<< (unsigned short value)
 
RWDataOutputStreamoperator<< (int value)
 
RWDataOutputStreamoperator<< (unsigned int value)
 
RWDataOutputStreamoperator<< (long value)
 
RWDataOutputStreamoperator<< (unsigned long value)
 
RWDataOutputStreamoperator<< (float value)
 
RWDataOutputStreamoperator<< (double value)
 
RWDataOutputStreamoperator<< (wchar_t value)
 
RWDataOutputStreamoperator<< (long long value)
 
RWDataOutputStreamoperator<< (long double value)
 
RWDataOutputStreamoperator= (const RWDataOutputStream &handle)
 
void putBool (bool value)
 
void putBools (const bool *arrayPt, RWSize count)
 
void putChar (char value)
 
virtual void putCharacter (char value)
 
void putChars (const char *arrayPt, RWSize count)
 
void putDouble (double value)
 
void putDoubles (const double *arrayPt, RWSize count)
 
void putFloat (float value)
 
void putFloats (const float *arrayPt, RWSize count)
 
void putInt (int value)
 
void putInts (const int *arrayPt, RWSize count)
 
void putLong (long value)
 
void putLongDouble (long double value)
 
void putLongDoubles (const long double *arrayPt, RWSize count)
 
void putLongLong (long long value)
 
void putLongLongs (const long long *arrayPt, RWSize count)
 
void putLongs (const long *arrayPt, RWSize count)
 
void putShort (short value)
 
void putShorts (const short *arrayPt, RWSize count)
 
void putSignedChar (signed char value)
 
void putSignedChars (const signed char *arrayPt, RWSize count)
 
virtual void putSizeT (size_t value)
 
void putString (const char *string, RWSize count)
 
virtual void putUCharacter (RWUChar value)
 
void putUnsignedChar (unsigned char value)
 
void putUnsignedChars (const unsigned char *arrayPt, RWSize count)
 
void putUnsignedInt (unsigned int value)
 
void putUnsignedInts (const unsigned int *arrayPt, RWSize count)
 
void putUnsignedLong (unsigned long value)
 
void putUnsignedLongs (const unsigned long *arrayPt, RWSize count)
 
void putUnsignedShort (unsigned short value)
 
void putUnsignedShorts (const unsigned short *arrayPt, RWSize count)
 
void putUString (const RWUChar *ustring, RWSize count)
 
void putWchar_t (wchar_t value)
 
void putWchar_ts (const wchar_t *arrayPt, RWSize count)
 
virtual void putWCharacter (wchar_t value)
 
void putWString (const wchar_t *wstring, RWSize count)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator< (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Related Functions

(Note that these are not member functions.)

RWDataOutputStreamrwEndl (RWDataOutputStream &stream)
 
RWDataOutputStreamrwEnds (RWDataOutputStream &stream)
 
RWDataOutputStreamrwFlush (RWDataOutputStream &stream)
 
RWDataOutputStream rwGuard (RWDataOutputStream &stream)
 
RWDataOutputStreamrwWEndl (RWDataOutputStream &stream)
 
RWDataOutputStreamrwWEnds (RWDataOutputStream &stream)
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (void)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (const RWHandleBase &second)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

Handle class for all the data output stream implementation classes. Implements the handle idiom from the handle-body pattern.

Constructor & Destructor Documentation

RWDataOutputStream::RWDataOutputStream ( RWDataOutputStreamImp ptr)
inlineexplicit

Constructor.

RWDataOutputStream::RWDataOutputStream ( const RWDataOutputStream handle)
inline

Copy constructor. Throws no exceptions.

Parameters
handleA data stream handle used to initialize this handle.

Member Function Documentation

void RWDataOutputStream::close ( void  )
inline

Closes the stream.

void RWDataOutputStream::flush ( void  )
inline

Flushes the stream.

bool RWDataOutputStream::isBad ( ) const
inline

Returns true to indicate a loss of integrity resulting from an output operation. Throws no exceptions.

bool RWDataOutputStream::isFail ( ) const
inline

Returns true to indicate that an output operation failed to generate the desired data. Throws no exceptions.

bool RWDataOutputStream::isGood ( ) const
inline

Returns true to indicate a stream in a valid state. Throws no exceptions.

RWDataOutputStream& RWDataOutputStream::operator<< ( RWDataOutputStream &(*)(RWDataOutputStream &)  pf)
inline

Insertor executing a manipulator function. Throws no exceptions.

Parameters
pfThe manipulator's function pointer.
RWDataOutputStream RWDataOutputStream::operator<< ( RWDataOutputStream(*)(RWDataOutputStream &)  pf)
inline

Insertor executing a manipulator function. Throws no exceptions.

Parameters
pfThe manipulator's function pointer.
RWDataOutputStream& RWDataOutputStream::operator<< ( bool  value)
inline

Writes a bool value to the stream.

Parameters
valueThe bool value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( char  value)
inline

Writes a char value to the stream.

Parameters
valueThe char value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( unsigned char  value)
inline

Writes an unsigned char value to the stream.

Parameters
valueThe unsigned char value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( signed char  value)
inline

Writes a signed char value to the stream.

Parameters
valueThe signed char value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( short  value)
inline

Writes a short value to the stream.

Parameters
valueThe short to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( unsigned short  value)
inline

Writes an unsigned short value to the stream.

Parameters
valueThe unsigned short to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( int  value)
inline

Writes an int value to the stream.

Parameters
valueThe int value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( unsigned int  value)
inline

Writes an unsigned int value to the stream.

Parameters
valueThe unsigned int value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( long  value)
inline

Writes a long value to the stream.

Parameters
valueThe long value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( unsigned long  value)
inline

Writes an unsigned long value to the stream.

Parameters
valueThe unsigned long value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( float  value)
inline

Writes a float value to the stream.

Parameters
valueThe float value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( double  value)
inline

Writes a double value to the stream.

Parameters
valueThe double value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( wchar_t  value)
inline

Writes a wchar_t value to the stream.

Parameters
valueThe wchar_t value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( long long  value)
inline

Writes a long long value to the stream.

Parameters
valueThe long long value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator<< ( long double  value)
inline

Writes a long double value to the stream.

Parameters
valueThe long double value to be written to the stream.
RWDataOutputStream& RWDataOutputStream::operator= ( const RWDataOutputStream handle)
inline

Assignment operator. Throws no exceptions.

Parameters
handleA data stream handle used to initialize this handle.
void RWDataOutputStream::putBool ( bool  value)
inline

Writes a bool value to the stream.

Parameters
valueThe bool value to be written to the stream.
void RWDataOutputStream::putBools ( const bool *  arrayPt,
RWSize  count 
)
inline

Writes an array of bool value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putChar ( char  value)
inline

Writes a char value to the stream.

Parameters
valueThe char value to be written to the stream.
virtual void RWDataOutputStream::putCharacter ( char  value)
inlinevirtual

Writes a narrow character to the stream.

Parameters
valueThe narrow character to be written to the stream.
void RWDataOutputStream::putChars ( const char *  arrayPt,
RWSize  count 
)
inline

Writes an array of char value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putDouble ( double  value)
inline

Writes a double value to the stream.

Parameters
valueThe double value to be written to the stream.
void RWDataOutputStream::putDoubles ( const double *  arrayPt,
RWSize  count 
)
inline

Writes an array of double value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putFloat ( float  value)
inline

Writes a float value to the stream.

Parameters
valueThe float value to be written to the stream.
void RWDataOutputStream::putFloats ( const float *  arrayPt,
RWSize  count 
)
inline

Writes an array of float value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putInt ( int  value)
inline

Writes an int value to the stream.

Parameters
valueThe int value to be written to the stream.
void RWDataOutputStream::putInts ( const int *  arrayPt,
RWSize  count 
)
inline

Writes an array of int value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putLong ( long  value)
inline

Writes a long value to the stream.

Parameters
valueThe long value to be written to the stream.
void RWDataOutputStream::putLongDouble ( long double  value)
inline

Writes a long double value to the stream.

Parameters
valueThe long double value to be written to the stream.
void RWDataOutputStream::putLongDoubles ( const long double *  arrayPt,
RWSize  count 
)
inline

Writes an array of long double value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putLongLong ( long long  value)
inline

Writes a long long value to the stream.

Parameters
valueThe long long value to be written to the stream.
void RWDataOutputStream::putLongLongs ( const long long *  arrayPt,
RWSize  count 
)
inline

Writes an array of long long value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putLongs ( const long *  arrayPt,
RWSize  count 
)
inline

Writes an array of long value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putShort ( short  value)
inline

Writes a short value to the stream.

Parameters
valueThe short value to be written to the stream.
void RWDataOutputStream::putShorts ( const short *  arrayPt,
RWSize  count 
)
inline

Writes an array of short value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putSignedChar ( signed char  value)
inline

Writes a signed char value to the stream.

Parameters
valueThe signed char value to be written to the stream.
void RWDataOutputStream::putSignedChars ( const signed char *  arrayPt,
RWSize  count 
)
inline

Writes an array of signed char value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
virtual void RWDataOutputStream::putSizeT ( size_t  value)
inlinevirtual

Writes a size_t value to the stream.

Parameters
valueThe size_t value to be written to the stream.
void RWDataOutputStream::putString ( const char *  string,
RWSize  count 
)
inline

Writes a narrow character string, including embedded nulls, starting at string to the stream.

Parameters
stringA pointer to the string's first narrow character.
countThe number of narrow characters to be written to the stream.
virtual void RWDataOutputStream::putUCharacter ( RWUChar  value)
inlinevirtual

Writes a UTF-16 character to the stream.

Parameters
valueThe UTF-16 character to be written to the stream.
void RWDataOutputStream::putUnsignedChar ( unsigned char  value)
inline

Writes an unsigned char value to the stream.

Parameters
valueThe unsigned char value to be written to the stream.
void RWDataOutputStream::putUnsignedChars ( const unsigned char *  arrayPt,
RWSize  count 
)
inline

Writes an array of unsigned char value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putUnsignedInt ( unsigned int  value)
inline

Writes an unsigned int value to the stream.

Parameters
valueThe unsigned int value to be written to the stream.
void RWDataOutputStream::putUnsignedInts ( const unsigned int *  arrayPt,
RWSize  count 
)
inline

Writes an array of unsigned int value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putUnsignedLong ( unsigned long  value)
inline

Writes an unsigned long value to the stream.

Parameters
valueThe unsigned long value to be written to the stream.
void RWDataOutputStream::putUnsignedLongs ( const unsigned long *  arrayPt,
RWSize  count 
)
inline

Writes an array of unsigned long value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putUnsignedShort ( unsigned short  value)
inline

Writes an unsigned short value to the stream.

Parameters
valueThe unsigned short value to be written to the stream.
void RWDataOutputStream::putUnsignedShorts ( const unsigned short *  arrayPt,
RWSize  count 
)
inline

Writes an array of unsigned short value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
void RWDataOutputStream::putUString ( const RWUChar ustring,
RWSize  count 
)
inline

Writes a UTF-16 character string, including embedded nulls, starting at ustring to the stream.

Parameters
ustringA pointer to the string's first UTF-16 character.
countThe number of UTF-16 characters to be written to the stream.
void RWDataOutputStream::putWchar_t ( wchar_t  value)
inline

Writes a wchar_t value to the stream.

Parameters
valueThe wchar_t value to be written to the stream.
void RWDataOutputStream::putWchar_ts ( const wchar_t *  arrayPt,
RWSize  count 
)
inline

Writes an array of wchar_t value(s) to the stream.

Parameters
arrayPtA pointer to the array's first element.
countThe number of element(s) to be written to the stream.
virtual void RWDataOutputStream::putWCharacter ( wchar_t  value)
inlinevirtual

Writes a wide character to the stream.

Parameters
valueThe wide character to be written to the stream.
void RWDataOutputStream::putWString ( const wchar_t *  wstring,
RWSize  count 
)
inline

Writes a wide character string, including embedded nulls, starting at wstring to the stream.

Parameters
wstringA pointer to the string's first narrow character.
countThe number of wide characters to be written to the stream.

Friends And Related Function Documentation

RWDataOutputStream & rwEndl ( RWDataOutputStream stream)
related

Manipulator that writes a narrow end-of-line control character to the stream.

Parameters
streamThe data stream to which the manipulator applies.
RWDataOutputStream & rwEnds ( RWDataOutputStream stream)
related

Manipulator that writes a narrow end of string character to the stream. to the stream.

Parameters
streamThe data stream to which the manipulator applies.
RWDataOutputStream & rwFlush ( RWDataOutputStream stream)
related

Manipulator that flushes a data output stream.

Parameters
streamThe data stream to be flushed.
RWDataOutputStream rwGuard ( RWDataOutputStream stream)
related
Header File
#include <rw/stream/RWGuardedDataOutputStreamImp.h>

Manipulator that is used to guard a series of insertion operations.

Parameters
streamA binary output stream.

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

Example
// Lock the stream for the duration of all three insertions:
ostr << rwGuard << data1 << data2 << data3;
RWDataOutputStream & rwWEndl ( RWDataOutputStream stream)
related

Manipulator that writes a wide end-of-line control character to the stream.

Parameters
streamThe data stream to which the manipulator applies.
RWDataOutputStream & rwWEnds ( RWDataOutputStream stream)
related

Manipulator that writes a wide end of string character to the stream. to the stream.

Parameters
streamThe data stream to which the manipulator applies.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.