SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWDataOutputStream &handle)
 
 RWDataOutputStream (RWDataOutputStreamImp *ptr)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWDataOutputStreamoperator<< (bool value)
 
RWDataOutputStreamoperator<< (char value)
 
RWDataOutputStreamoperator<< (double value)
 
RWDataOutputStreamoperator<< (float value)
 
RWDataOutputStreamoperator<< (int value)
 
RWDataOutputStreamoperator<< (long double value)
 
RWDataOutputStreamoperator<< (long long value)
 
RWDataOutputStreamoperator<< (long value)
 
RWDataOutputStreamoperator<< (RWDataOutputStream &(*pf)(RWDataOutputStream &))
 
RWDataOutputStream operator<< (RWDataOutputStream(*pf)(RWDataOutputStream &))
 
RWDataOutputStreamoperator<< (short value)
 
RWDataOutputStreamoperator<< (signed char value)
 
RWDataOutputStreamoperator<< (unsigned char value)
 
RWDataOutputStreamoperator<< (unsigned int value)
 
RWDataOutputStreamoperator<< (unsigned long value)
 
RWDataOutputStreamoperator<< (unsigned short value)
 
RWDataOutputStreamoperator<< (wchar_t 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
 

Friends

class RWTStreamGuardImp< RWDataOutputStream, RWFilteredDataOutputStreamImp >
 

Related Symbols

(Note that these are not member symbols.)

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 (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~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() [1/2]

RWDataOutputStream::RWDataOutputStream ( RWDataOutputStreamImp * ptr)
inlineexplicit

Constructor.

◆ RWDataOutputStream() [2/2]

RWDataOutputStream::RWDataOutputStream ( const RWDataOutputStream & handle)
inline

Copy constructor. Throws no exceptions.

Parameters
handleA data stream handle used to initialize this handle.

Member Function Documentation

◆ close()

void RWDataOutputStream::close ( )
inline

Closes the stream.

◆ flush()

void RWDataOutputStream::flush ( )
inline

Flushes the stream.

◆ isBad()

bool RWDataOutputStream::isBad ( ) const
inline

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

◆ isFail()

bool RWDataOutputStream::isFail ( ) const
inline

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

◆ isGood()

bool RWDataOutputStream::isGood ( ) const
inline

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

◆ operator<<() [1/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( bool value)
inline

Writes a bool value to the stream.

Parameters
valueThe bool value to be written to the stream.

◆ operator<<() [2/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( char value)
inline

Writes a char value to the stream.

Parameters
valueThe char value to be written to the stream.

◆ operator<<() [3/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( double value)
inline

Writes a double value to the stream.

Parameters
valueThe double value to be written to the stream.

◆ operator<<() [4/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( float value)
inline

Writes a float value to the stream.

Parameters
valueThe float value to be written to the stream.

◆ operator<<() [5/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( int value)
inline

Writes an int value to the stream.

Parameters
valueThe int value to be written to the stream.

◆ operator<<() [6/17]

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.

◆ operator<<() [7/17]

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.

◆ operator<<() [8/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( long value)
inline

Writes a long value to the stream.

Parameters
valueThe long value to be written to the stream.

◆ operator<<() [9/17]

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

Insertor executing a manipulator function. Throws no exceptions.

Parameters
pfThe manipulator's function pointer.

◆ operator<<() [10/17]

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

Insertor executing a manipulator function. Throws no exceptions.

Parameters
pfThe manipulator's function pointer.

◆ operator<<() [11/17]

RWDataOutputStream & RWDataOutputStream::operator<< ( short value)
inline

Writes a short value to the stream.

Parameters
valueThe short to be written to the stream.

◆ operator<<() [12/17]

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.

◆ operator<<() [13/17]

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.

◆ operator<<() [14/17]

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.

◆ operator<<() [15/17]

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.

◆ operator<<() [16/17]

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.

◆ operator<<() [17/17]

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.

◆ operator=()

RWDataOutputStream & RWDataOutputStream::operator= ( const RWDataOutputStream & handle)
inline

Assignment operator. Throws no exceptions.

Parameters
handleA data stream handle used to initialize this handle.

◆ putBool()

void RWDataOutputStream::putBool ( bool value)
inline

Writes a bool value to the stream.

Parameters
valueThe bool value to be written to the stream.

◆ putBools()

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.

◆ putChar()

void RWDataOutputStream::putChar ( char value)
inline

Writes a char value to the stream.

Parameters
valueThe char value to be written to the stream.

◆ putCharacter()

virtual void RWDataOutputStream::putCharacter ( char value)
inlinevirtual

Writes a narrow character to the stream.

Parameters
valueThe narrow character to be written to the stream.

◆ putChars()

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.

◆ putDouble()

void RWDataOutputStream::putDouble ( double value)
inline

Writes a double value to the stream.

Parameters
valueThe double value to be written to the stream.

◆ putDoubles()

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.

◆ putFloat()

void RWDataOutputStream::putFloat ( float value)
inline

Writes a float value to the stream.

Parameters
valueThe float value to be written to the stream.

◆ putFloats()

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.

◆ putInt()

void RWDataOutputStream::putInt ( int value)
inline

Writes an int value to the stream.

Parameters
valueThe int value to be written to the stream.

◆ putInts()

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.

◆ putLong()

void RWDataOutputStream::putLong ( long value)
inline

Writes a long value to the stream.

Parameters
valueThe long value to be written to the stream.

◆ putLongDouble()

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.

◆ putLongDoubles()

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.

◆ putLongLong()

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.

◆ putLongLongs()

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.

◆ putLongs()

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.

◆ putShort()

void RWDataOutputStream::putShort ( short value)
inline

Writes a short value to the stream.

Parameters
valueThe short value to be written to the stream.

◆ putShorts()

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.

◆ putSignedChar()

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.

◆ putSignedChars()

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.

◆ putSizeT()

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.

◆ putString()

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.

◆ putUCharacter()

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.

◆ putUnsignedChar()

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.

◆ putUnsignedChars()

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.

◆ putUnsignedInt()

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.

◆ putUnsignedInts()

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.

◆ putUnsignedLong()

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.

◆ putUnsignedLongs()

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.

◆ putUnsignedShort()

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.

◆ putUnsignedShorts()

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.

◆ putUString()

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.

◆ putWchar_t()

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.

◆ putWchar_ts()

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.

◆ putWCharacter()

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.

◆ putWString()

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 Symbol Documentation

◆ rwEndl()

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.

◆ rwEnds()

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.

◆ rwFlush()

RWDataOutputStream & rwFlush ( RWDataOutputStream & stream)
related

Manipulator that flushes a data output stream.

Parameters
streamThe data stream to be flushed.

◆ rwGuard()

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 rwGuard(RWDataOutputStream &stream)

◆ rwWEndl()

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.

◆ rwWEnds()

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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.