SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWNativeDataToByteOutputStreamImp Class Reference

Writes data in native format to a binary stream. More...

#include <rw/stream/RWNativeDataToByteOutputStreamImp.h>

Inheritance diagram for RWNativeDataToByteOutputStreamImp:
RWDataToByteOutputStreamImp RWDataOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

Public Member Functions

virtual ~RWNativeDataToByteOutputStreamImp ()
 
virtual void putBool (bool value)
 
virtual void putBools (const bool *arrayPt, RWSize count)
 
virtual void putChar (char value)
 
virtual void putCharacter (char value)
 
virtual void putChars (const char *arrayPt, RWSize count)
 
virtual void putDouble (double value)
 
virtual void putDoubles (const double *arrayPt, RWSize count)
 
virtual void putFloat (float value)
 
virtual void putFloats (const float *arrayPt, RWSize count)
 
virtual void putInt (int value)
 
virtual void putInts (const int *arrayPt, RWSize count)
 
virtual void putLong (long value)
 
virtual void putLongDouble (long double value)
 
virtual void putLongDoubles (const long double *arrayPt, RWSize count)
 
virtual void putLongLong (long long value)
 
virtual void putLongLongs (const long long *arrayPt, RWSize count)
 
virtual void putLongs (const long *arrayPt, RWSize count)
 
virtual void putShort (short value)
 
virtual void putShorts (const short *arrayPt, RWSize count)
 
virtual void putSignedChar (signed char value)
 
virtual void putSignedChars (const signed char *arrayPt, RWSize count)
 
virtual void putSizeT (size_t value)
 
virtual void putString (const char *string, RWSize count)
 
virtual void putUCharacter (RWUChar value)
 
virtual void putUnsignedChar (unsigned char value)
 
virtual void putUnsignedChars (const unsigned char *arrayPt, RWSize count)
 
virtual void putUnsignedInt (unsigned int value)
 
virtual void putUnsignedInts (const unsigned int *arrayPt, RWSize count)
 
virtual void putUnsignedLong (unsigned long value)
 
virtual void putUnsignedLongLong (unsigned long long value)
 
virtual void putUnsignedLongLongs (const unsigned long long *arrayPt, RWSize count)
 
virtual void putUnsignedLongs (const unsigned long *arrayPt, RWSize count)
 
virtual void putUnsignedShort (unsigned short value)
 
virtual void putUnsignedShorts (const unsigned short *arrayPt, RWSize count)
 
virtual void putUString (const RWUChar *ustring, RWSize count)
 
virtual void putWchar_t (wchar_t value)
 
virtual void putWchar_ts (const wchar_t *arrayPt, RWSize count)
 
virtual void putWCharacter (wchar_t value)
 
virtual void putWString (const wchar_t *wstring, RWSize count)
 
- Public Member Functions inherited from RWDataToByteOutputStreamImp
virtual ~RWDataToByteOutputStreamImp ()
 
virtual void close ()
 
virtual void flush ()
 
virtual bool isBad () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
- Public Member Functions inherited from RWDataOutputStreamImp
virtual ~RWDataOutputStreamImp ()
 
virtual RWDataOutputStream acquire ()
 
virtual void release ()
 
- Public Member Functions inherited from RWOutputStreamImp
virtual ~RWOutputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Static Public Member Functions

static RWDataOutputStream make (const RWByteOutputStream &sink)
 

Protected Member Functions

 RWNativeDataToByteOutputStreamImp (const RWByteOutputStream &sinkStream)
 
- Protected Member Functions inherited from RWDataToByteOutputStreamImp
 RWDataToByteOutputStreamImp (const RWByteOutputStream &sinkStream)
 
RWByteOutputStreamgetSinkStream ()
 
const RWByteOutputStreamgetSinkStream () const
 
- Protected Member Functions inherited from RWDataOutputStreamImp
 RWDataOutputStreamImp ()
 
- Protected Member Functions inherited from RWOutputStreamImp
 RWOutputStreamImp ()
 
- Protected Member Functions inherited from RWStreamImp
 RWStreamImp ()
 
- Protected Member Functions inherited from RWBodyBase
 RWBodyBase (const RWBodyBase &second)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (void)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (const RWBodyBase &second)
 
- Protected Member Functions inherited from RWTCountingBody< RWMutexLock >
 RWTCountingBody (const RWTCountingBody< RWMutexLock > &second)
 
 RWTCountingBody (RWStaticCtor)
 
 RWTCountingBody (unsigned initCount=0)
 
RWTCountingBody< RWMutexLock > & operator= (const RWTCountingBody< RWMutexLock > &second)
 
 ~RWTCountingBody (void)
 
unsigned addReference (void)
 
unsigned references (void) const
 
unsigned removeReference (void)
 
- Protected Member Functions inherited from RWTMonitor< RWMutexLock >
 RWTMonitor (const RWTMonitor< RWMutexLock > &second)
 
 RWTMonitor (RWStaticCtor)
 
 RWTMonitor (void)
 
 ~RWTMonitor (void)
 
void acquire (void)
 
bool isAcquired (void) const
 
RWTMonitor< RWMutexLock > & monitor (void) const
 
RWMutexLockmutex (void)
 
RWTMonitor< RWMutexLock > & operator= (const RWTMonitor< RWMutexLock > &)
 
void release (void)
 
bool tryAcquire (void)
 

Additional Inherited Members

- Protected Types inherited from RWTCountingBody< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 
- Protected Types inherited from RWTMonitor< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 

Detailed Description

The class RWNativeDataToByteOutputStreamImp writes data in native format to a binary stream. Implements the body idiom from the handle-body pattern.

Constructor & Destructor Documentation

◆ ~RWNativeDataToByteOutputStreamImp()

virtual RWNativeDataToByteOutputStreamImp::~RWNativeDataToByteOutputStreamImp ( )
virtual

Destructor.

◆ RWNativeDataToByteOutputStreamImp()

RWNativeDataToByteOutputStreamImp::RWNativeDataToByteOutputStreamImp ( const RWByteOutputStream & sinkStream)
inlineprotected

Initializes the reference to the binary stream that will be used as the byte sink.

Parameters
sinkStreamThe binary stream that will serve as the byte sink.

Member Function Documentation

◆ make()

static RWDataOutputStream RWNativeDataToByteOutputStreamImp::make ( const RWByteOutputStream & sink)
inlinestatic

Constructs an RWNativeDataToByteOutputStreamImp instance that uses sink as its byte sink, and returns a handle to it. Throws no exceptions.

Parameters
sinkThe binary stream that is used as the byte sink.

◆ putBool()

virtual void RWNativeDataToByteOutputStreamImp::putBool ( bool value)
virtual

Writes a bool value to the binary stream, used as the data sink.

Parameters
valueThe bool value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putBools()

virtual void RWNativeDataToByteOutputStreamImp::putBools ( const bool * arrayPt,
RWSize count )
virtual

Writes an array of bool values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putChar()

virtual void RWNativeDataToByteOutputStreamImp::putChar ( char value)
virtual

Writes a char value to the binary stream, used as the data sink.

Parameters
valueThe char value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putCharacter()

virtual void RWNativeDataToByteOutputStreamImp::putCharacter ( char value)
virtual

Writes a narrow character to the binary stream that is used as the data sink.

Parameters
valueThe narrow character to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putChars()

virtual void RWNativeDataToByteOutputStreamImp::putChars ( const char * arrayPt,
RWSize count )
virtual

Writes an array of char values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putDouble()

virtual void RWNativeDataToByteOutputStreamImp::putDouble ( double value)
virtual

Writes a double value to the binary stream, used as the data sink.

Parameters
valueThe double value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putDoubles()

virtual void RWNativeDataToByteOutputStreamImp::putDoubles ( const double * arrayPt,
RWSize count )
virtual

Writes an array of double values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putFloat()

virtual void RWNativeDataToByteOutputStreamImp::putFloat ( float value)
virtual

Writes a float value to the binary stream, used as the data sink.

Parameters
valueThe float value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putFloats()

virtual void RWNativeDataToByteOutputStreamImp::putFloats ( const float * arrayPt,
RWSize count )
virtual

Writes an array of float values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putInt()

virtual void RWNativeDataToByteOutputStreamImp::putInt ( int value)
virtual

Writes a int value to the binary stream, used as the data sink.

Parameters
valueThe int value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putInts()

virtual void RWNativeDataToByteOutputStreamImp::putInts ( const int * arrayPt,
RWSize count )
virtual

Writes an array of int values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLong()

virtual void RWNativeDataToByteOutputStreamImp::putLong ( long value)
virtual

Writes a long value to the binary stream, used as the data sink.

Parameters
valueThe long value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLongDouble()

virtual void RWNativeDataToByteOutputStreamImp::putLongDouble ( long double value)
virtual

Writes a long double value to the binary stream, used as the data sink.

Parameters
valueThe long double value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLongDoubles()

virtual void RWNativeDataToByteOutputStreamImp::putLongDoubles ( const long double * arrayPt,
RWSize count )
virtual

Writes an array of long double values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLongLong()

virtual void RWNativeDataToByteOutputStreamImp::putLongLong ( long long value)
virtual

Writes a long long value to the binary stream, used as the data sink.

Parameters
valueThe long long value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLongLongs()

virtual void RWNativeDataToByteOutputStreamImp::putLongLongs ( const long long * arrayPt,
RWSize count )
virtual

Writes an array of long long values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putLongs()

virtual void RWNativeDataToByteOutputStreamImp::putLongs ( const long * arrayPt,
RWSize count )
virtual

Writes an array of long values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putShort()

virtual void RWNativeDataToByteOutputStreamImp::putShort ( short value)
virtual

Writes a short value to the binary stream, used as the data sink.

Parameters
valueThe short value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putShorts()

virtual void RWNativeDataToByteOutputStreamImp::putShorts ( const short * arrayPt,
RWSize count )
virtual

Writes an array of short values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putSignedChar()

virtual void RWNativeDataToByteOutputStreamImp::putSignedChar ( signed char value)
virtual

Writes a signed char value to the binary stream, used as the data sink.

Parameters
valueThe signed char value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putSignedChars()

virtual void RWNativeDataToByteOutputStreamImp::putSignedChars ( const signed char * arrayPt,
RWSize count )
virtual

Writes an array of signed char values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putSizeT()

virtual void RWNativeDataToByteOutputStreamImp::putSizeT ( size_t value)
virtual

Writes a size_t character to the binary stream that is used as the data sink.

Parameters
valueThe size_t character to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putString()

virtual void RWNativeDataToByteOutputStreamImp::putString ( const char * string,
RWSize count )
virtual

Writes a narrow character string to the binary stream that is used as the data sink.

Parameters
stringA pointer to the string's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUCharacter()

virtual void RWNativeDataToByteOutputStreamImp::putUCharacter ( RWUChar value)
virtual

Writes a UTF-16 character to the binary stream that is used as the data sink.

Parameters
valueThe UTF-16 character to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedChar()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedChar ( unsigned char value)
virtual

Writes a unsigned char value to the binary stream, used as the data sink.

Parameters
valueThe unsigned char value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedChars()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedChars ( const unsigned char * arrayPt,
RWSize count )
virtual

Writes an array of unsigned char values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedInt()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedInt ( unsigned int value)
virtual

Writes a unsigned int value to the binary stream, used as the data sink.

Parameters
valueThe unsigned int value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedInts()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedInts ( const unsigned int * arrayPt,
RWSize count )
virtual

Writes an array of unsigned int values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedLong()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedLong ( unsigned long value)
virtual

Writes a unsigned long value to the binary stream, used as the data sink.

Parameters
valueThe unsigned long value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedLongLong()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedLongLong ( unsigned long long value)
virtual

Writes an unsigned long long value to the binary stream, used as the data sink.

Parameters
valueThe unsigned long long value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedLongLongs()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedLongLongs ( const unsigned long long * arrayPt,
RWSize count )
virtual

Writes an array of unsigned long long values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedLongs()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedLongs ( const unsigned long * arrayPt,
RWSize count )
virtual

Writes an array of unsigned long values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedShort()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedShort ( unsigned short value)
virtual

Writes a unsigned short value to the binary stream, used as the data sink.

Parameters
valueThe unsigned short value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUnsignedShorts()

virtual void RWNativeDataToByteOutputStreamImp::putUnsignedShorts ( const unsigned short * arrayPt,
RWSize count )
virtual

Writes an array of unsigned short values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putUString()

virtual void RWNativeDataToByteOutputStreamImp::putUString ( const RWUChar * ustring,
RWSize count )
virtual

Writes a UTF-16 character string to the binary stream that is used as the data sink.

Parameters
ustringA pointer to the string's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putWchar_t()

virtual void RWNativeDataToByteOutputStreamImp::putWchar_t ( wchar_t value)
virtual

Writes a wchar_t value to the binary stream, used as the data sink.

Parameters
valueThe wchar_t value to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putWchar_ts()

virtual void RWNativeDataToByteOutputStreamImp::putWchar_ts ( const wchar_t * arrayPt,
RWSize count )
virtual

Writes an array of wchar_t values to the binary stream, used as the data sink.

Parameters
arrayPtA pointer to the array's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putWCharacter()

virtual void RWNativeDataToByteOutputStreamImp::putWCharacter ( wchar_t value)
virtual

Writes a wide character to the binary stream that is used as the data sink.

Parameters
valueThe wide character to be written to the stream.

Implements RWDataOutputStreamImp.

◆ putWString()

virtual void RWNativeDataToByteOutputStreamImp::putWString ( const wchar_t * wstring,
RWSize count )
virtual

Writes a wide character string to the binary stream that is used as the data sink.

Parameters
wstringA pointer to the string's first element.
countThe number of elements to be written to the stream.

Implements RWDataOutputStreamImp.

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