SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWNativeDataFromByteInputStreamImp Class Reference

Reads data in native format from a binary stream. More...

#include <rw/stream/RWNativeDataFromByteInputStreamImp.h>

Inheritance diagram for RWNativeDataFromByteInputStreamImp:
RWDataFromByteInputStreamImp RWDataInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

Public Member Functions

virtual ~RWNativeDataFromByteInputStreamImp ()
 
virtual void getBool (bool &value)
 
virtual RWSize getBools (bool *arrayPt, RWSize count)
 
virtual void getChar (char &value)
 
virtual void getCharacter (char &value)
 
virtual RWSize getChars (char *arrayPt, RWSize count)
 
virtual RWSize getDelimitedString (char *string, RWSize maxCount, char delim)
 
virtual RWSize getDelimitedUString (RWUChar *ustring, RWSize maxCount, RWUChar delim)
 
virtual RWSize getDelimitedWString (wchar_t *wstring, RWSize maxCount, wchar_t delim)
 
virtual void getDouble (double &value)
 
virtual RWSize getDoubles (double *arrayPt, RWSize count)
 
virtual void getFloat (float &value)
 
virtual RWSize getFloats (float *arrayPt, RWSize count)
 
virtual void getInt (int &value)
 
virtual RWSize getInts (int *arrayPt, RWSize count)
 
virtual void getLong (long &value)
 
virtual void getLongDouble (long double &value)
 
virtual RWSize getLongDoubles (long double *arrayPt, RWSize count)
 
virtual void getLongLong (long long &value)
 
virtual RWSize getLongLongs (long long *arrayPt, RWSize count)
 
virtual RWSize getLongs (long *arrayPt, RWSize count)
 
virtual void getShort (short &value)
 
virtual RWSize getShorts (short *arrayPt, RWSize count)
 
virtual void getSignedChar (signed char &value)
 
virtual RWSize getSignedChars (signed char *arrayPt, RWSize count)
 
virtual void getSizeT (size_t &value)
 
virtual RWSize getString (char *string, RWSize count)
 
virtual void getUCharacter (RWUChar &value)
 
virtual void getUnsignedChar (unsigned char &value)
 
virtual RWSize getUnsignedChars (unsigned char *arrayPt, RWSize count)
 
virtual void getUnsignedInt (unsigned int &value)
 
virtual RWSize getUnsignedInts (unsigned int *arrayPt, RWSize count)
 
virtual void getUnsignedLong (unsigned long &value)
 
virtual void getUnsignedLongLong (unsigned long long &value)
 
virtual RWSize getUnsignedLongLongs (unsigned long long *arrayPt, RWSize count)
 
virtual RWSize getUnsignedLongs (unsigned long *arrayPt, RWSize count)
 
virtual void getUnsignedShort (unsigned short &value)
 
virtual RWSize getUnsignedShorts (unsigned short *arrayPt, RWSize count)
 
virtual RWSize getUString (RWUChar *arrayPt, RWSize count)
 
virtual void getWchar_t (wchar_t &value)
 
virtual RWSize getWchar_ts (wchar_t *arrayPt, RWSize count)
 
virtual void getWCharacter (wchar_t &value)
 
virtual RWSize getWString (wchar_t *wstring, RWSize count)
 
- Public Member Functions inherited from RWDataFromByteInputStreamImp
virtual ~RWDataFromByteInputStreamImp ()
 
virtual RWSize available () const
 
virtual void close ()
 
virtual bool isBad () const
 
virtual bool isEof () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual RWSize skip (RWSize numUnits)
 
- Public Member Functions inherited from RWDataInputStreamImp
virtual ~RWDataInputStreamImp ()
 
- Public Member Functions inherited from RWInputStreamImp
virtual ~RWInputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Static Public Member Functions

static RWDataInputStream make (const RWByteInputStream &source)
 

Protected Member Functions

 RWNativeDataFromByteInputStreamImp (const RWByteInputStream &sourceStream)
 
- Protected Member Functions inherited from RWDataFromByteInputStreamImp
 RWDataFromByteInputStreamImp (const RWByteInputStream &sourceStream)
 
void clearFail ()
 
RWByteInputStreamgetSourceStream ()
 
const RWByteInputStreamgetSourceStream () const
 
void setFail ()
 
- Protected Member Functions inherited from RWDataInputStreamImp
 RWDataInputStreamImp ()
 
- Protected Member Functions inherited from RWInputStreamImp
 RWInputStreamImp ()
 
- 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 RWNativeDataFromByteInputStreamImp reads data in native format from a binary stream. It implements the body idiom from the handle-body pattern.

Constructor & Destructor Documentation

◆ ~RWNativeDataFromByteInputStreamImp()

virtual RWNativeDataFromByteInputStreamImp::~RWNativeDataFromByteInputStreamImp ( )
virtual

Destructor.

◆ RWNativeDataFromByteInputStreamImp()

RWNativeDataFromByteInputStreamImp::RWNativeDataFromByteInputStreamImp ( const RWByteInputStream & sourceStream)
inlineprotected

Initializes the reference to the binary stream that will be used as the source of bytes.

Parameters
sourceStreamThe binary stream that will serve as the source of bytes.

Member Function Documentation

◆ getBool()

virtual void RWNativeDataFromByteInputStreamImp::getBool ( bool & value)
virtual

Reads a bool value from the stream.

Parameters
valueThe bool value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getBools()

virtual RWSize RWNativeDataFromByteInputStreamImp::getBools ( bool * arrayPt,
RWSize count )
virtual

Reads an array of bool value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getChar()

virtual void RWNativeDataFromByteInputStreamImp::getChar ( char & value)
virtual

Reads a char value from the stream.

Parameters
valueThe char value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getCharacter()

virtual void RWNativeDataFromByteInputStreamImp::getCharacter ( char & value)
virtual

Reads a char value from the stream.

Parameters
valueThe char value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getChars()

virtual RWSize RWNativeDataFromByteInputStreamImp::getChars ( char * arrayPt,
RWSize count )
virtual

Reads an array of char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getDelimitedString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedString ( char * string,
RWSize maxCount,
char delim )
virtual

Reads narrow characters from the stream until the last character read is equal to delim, or maxCount narrow characters have been read, or the end of the input sequence is reached. The narrow characters read are stored in string. The function returns the actual number of narrow characters read from the stream.

Parameters
stringA pointer to the string receiving the narrow characters extracted from the stream.
maxCountThe maximum number of narrow characters to be read.
delimThe narrow character used as a delimiter.

Implements RWDataInputStreamImp.

◆ getDelimitedUString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedUString ( RWUChar * ustring,
RWSize maxCount,
RWUChar delim )
virtual

Reads UTF-16 characters from the stream until the last character read is equal to delim, or maxCount UTF-16 characters have been read, or the end of the input sequence is reached. The UTF-16 characters read are stored in ustring. The function returns the actual number of UTF-16 characters read from the stream.

Parameters
ustringA pointer to the string receiving the UTF-16 characters extracted from the stream.
maxCountThe maximum number of UTF-16 characters to be read.
delimThe UTF-16 character used as a delimiter.

Implements RWDataInputStreamImp.

◆ getDelimitedWString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedWString ( wchar_t * wstring,
RWSize maxCount,
wchar_t delim )
virtual

Reads wide characters from the stream until the last character read is equal to delim, or maxCount wide characters have been read, or the end of the input sequence is reached. The wide characters read are stored in wstring. The function returns the actual number of wide characters read from the stream.

Parameters
wstringA pointer to the string receiving the wide characters extracted from the stream.
maxCountThe maximum number of wide characters to be read.
delimThe wide character used as a delimiter.

Implements RWDataInputStreamImp.

◆ getDouble()

virtual void RWNativeDataFromByteInputStreamImp::getDouble ( double & value)
virtual

Reads a double value from the stream.

Parameters
valueThe double value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getDoubles()

virtual RWSize RWNativeDataFromByteInputStreamImp::getDoubles ( double * arrayPt,
RWSize count )
virtual

Reads an array of double value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getFloat()

virtual void RWNativeDataFromByteInputStreamImp::getFloat ( float & value)
virtual

Reads a float value from the stream.

Parameters
valueThe float value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getFloats()

virtual RWSize RWNativeDataFromByteInputStreamImp::getFloats ( float * arrayPt,
RWSize count )
virtual

Reads an array of float value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getInt()

virtual void RWNativeDataFromByteInputStreamImp::getInt ( int & value)
virtual

Reads a int value from the stream.

Parameters
valueThe int value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getInts()

virtual RWSize RWNativeDataFromByteInputStreamImp::getInts ( int * arrayPt,
RWSize count )
virtual

Reads an array of int value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getLong()

virtual void RWNativeDataFromByteInputStreamImp::getLong ( long & value)
virtual

Reads a long value from the stream.

Parameters
valueThe long value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getLongDouble()

virtual void RWNativeDataFromByteInputStreamImp::getLongDouble ( long double & value)
virtual

Reads a long double value from the stream.

Parameters
valueThe long double value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getLongDoubles()

virtual RWSize RWNativeDataFromByteInputStreamImp::getLongDoubles ( long double * arrayPt,
RWSize count )
virtual

Reads an array of long double value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getLongLong()

virtual void RWNativeDataFromByteInputStreamImp::getLongLong ( long long & value)
virtual

Reads a long long value from the stream.

Parameters
valueThe long long value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getLongLongs()

virtual RWSize RWNativeDataFromByteInputStreamImp::getLongLongs ( long long * arrayPt,
RWSize count )
virtual

Reads an array of long long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getLongs()

virtual RWSize RWNativeDataFromByteInputStreamImp::getLongs ( long * arrayPt,
RWSize count )
virtual

Reads an array of long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getShort()

virtual void RWNativeDataFromByteInputStreamImp::getShort ( short & value)
virtual

Reads a short value from the stream.

Parameters
valueThe short value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getShorts()

virtual RWSize RWNativeDataFromByteInputStreamImp::getShorts ( short * arrayPt,
RWSize count )
virtual

Reads an array of short value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getSignedChar()

virtual void RWNativeDataFromByteInputStreamImp::getSignedChar ( signed char & value)
virtual

Reads a signed char value from the stream.

Parameters
valueThe signed char value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getSignedChars()

virtual RWSize RWNativeDataFromByteInputStreamImp::getSignedChars ( signed char * arrayPt,
RWSize count )
virtual

Reads an array of signed char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getSizeT()

virtual void RWNativeDataFromByteInputStreamImp::getSizeT ( size_t & value)
virtual

Reads a size_t value from the stream.

Parameters
valueThe size_t value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getString ( char * string,
RWSize count )
virtual

Reads a narrow character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUCharacter()

virtual void RWNativeDataFromByteInputStreamImp::getUCharacter ( RWUChar & value)
virtual

Reads a UTF-16 character from the stream.

Parameters
valueThe UTF-16 value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedChar()

virtual void RWNativeDataFromByteInputStreamImp::getUnsignedChar ( unsigned char & value)
virtual

Reads a unsigned char value from the stream.

Parameters
valueThe unsigned char value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedChars()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedChars ( unsigned char * arrayPt,
RWSize count )
virtual

Reads an array of unsigned char value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUnsignedInt()

virtual void RWNativeDataFromByteInputStreamImp::getUnsignedInt ( unsigned int & value)
virtual

Reads a unsigned int value from the stream.

Parameters
valueThe unsigned int value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedInts()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedInts ( unsigned int * arrayPt,
RWSize count )
virtual

Reads an array of unsigned int value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUnsignedLong()

virtual void RWNativeDataFromByteInputStreamImp::getUnsignedLong ( unsigned long & value)
virtual

Reads a unsigned long value from the stream.

Parameters
valueThe unsigned long value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedLongLong()

virtual void RWNativeDataFromByteInputStreamImp::getUnsignedLongLong ( unsigned long long & value)
virtual

Reads a unsigned long long value from the stream.

Parameters
valueThe unsigned long long value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedLongLongs()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedLongLongs ( unsigned long long * arrayPt,
RWSize count )
virtual

Reads an array of unsigned long long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUnsignedLongs()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedLongs ( unsigned long * arrayPt,
RWSize count )
virtual

Reads an array of unsigned long value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUnsignedShort()

virtual void RWNativeDataFromByteInputStreamImp::getUnsignedShort ( unsigned short & value)
virtual

Reads a unsigned short value from the stream.

Parameters
valueThe unsigned short value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getUnsignedShorts()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedShorts ( unsigned short * arrayPt,
RWSize count )
virtual

Reads an array of unsigned short value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getUString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getUString ( RWUChar * arrayPt,
RWSize count )
virtual

Reads a UTF-16 character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

Parameters
arrayPtA pointer to the string's first element.
countThe number of elements to be read from the stream.

Implements RWDataInputStreamImp.

◆ getWchar_t()

virtual void RWNativeDataFromByteInputStreamImp::getWchar_t ( wchar_t & value)
virtual

Reads a wchar_t value from the stream.

Parameters
valueThe wchar_t value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getWchar_ts()

virtual RWSize RWNativeDataFromByteInputStreamImp::getWchar_ts ( wchar_t * arrayPt,
RWSize count )
virtual

Reads an array of wchar_t value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ getWCharacter()

virtual void RWNativeDataFromByteInputStreamImp::getWCharacter ( wchar_t & value)
virtual

Reads a wchar_t value from the stream.

Parameters
valueThe wchar_t value to be read from the stream.

Implements RWDataInputStreamImp.

◆ getWString()

virtual RWSize RWNativeDataFromByteInputStreamImp::getWString ( wchar_t * wstring,
RWSize count )
virtual

Reads a wide character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.

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

Implements RWDataInputStreamImp.

◆ make()

static RWDataInputStream RWNativeDataFromByteInputStreamImp::make ( const RWByteInputStream & source)
inlinestatic

Constructs an RWNativeDataFromByteInputStreamImp instance that uses source as the source of bytes, and returns a handle to it. Throws no exceptions.

Parameters
sourceThe binary stream that is used as the source of bytes.

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