SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
RWObjectInputStream Class Reference

Handle class for object input stream implementation classes. More...

#include <rw/serial/RWObjectInputStream.h>

Inheritance diagram for RWObjectInputStream:
RWDataInputStream RWHandleBase

Public Member Functions

 RWObjectInputStream (RWObjectInputStreamImp *body)
 
 RWObjectInputStream (const RWObjectInputStream &handle)
 
void closeContext (bool readContext=true)
 
void endAssoc ()
 
void endBlock ()
 
void endElement ()
 
void endMap ()
 
void endMember ()
 
void endParent ()
 
void endSequence ()
 
void * getNewObject (const std::type_info *base)
 
void getString (RWCString &value)
 
void getString (std::string &value)
 
void getSymbol (RWSymbol &value)
 
void getUString (RWBasicUString &value)
 
void getWString (RWWString &value)
 
void openContext (bool readContext=true)
 
RWObjectInputStreamoperator= (const RWObjectInputStream &handle)
 
RWSymbol readTypeInfo ()
 
void rememberObject (const void *obj)
 
void startAssocKey ()
 
void startAssocValue ()
 
RWSymbol startBlock ()
 
void startElement (int &position)
 
RWSymbol startMap (int &count, RWStreamType &keyType, RWStreamType &valueType)
 
bool startMember (RWSymbol &memberName, RWStreamType &memberType)
 
void startParent (const RWSymbol &typeInfo)
 
RWSymbol startSequence (int &count, RWStreamType &elementType)
 
- Public Member Functions inherited from RWDataInputStream
 RWDataInputStream (RWDataInputStreamImp *ptr)
 
 RWDataInputStream (const RWDataInputStream &handle)
 
RWSize available () const
 
void close ()
 
void getBool (bool &value)
 
RWSize getBools (bool *arrayPt, RWSize count)
 
void getChar (char &value)
 
void getCharacter (char &value)
 
RWSize getChars (char *arrayPt, RWSize count)
 
RWSize getDelimitedString (char *string, RWSize maxCount, char delim= '\0')
 
RWSize getDelimitedUString (RWUChar *ustring, RWSize maxCount, RWUChar delim)
 
RWSize getDelimitedWString (wchar_t *wstring, RWSize maxCount, wchar_t delim=L'\0')
 
void getDouble (double &value)
 
RWSize getDoubles (double *arrayPt, RWSize count)
 
void getFloat (float &value)
 
RWSize getFloats (float *arrayPt, RWSize count)
 
void getInt (int &value)
 
RWSize getInts (int *arrayPt, RWSize count)
 
void getLong (long &value)
 
void getLongDouble (long double &value)
 
RWSize getLongDoubles (long double *arrayPt, RWSize count)
 
void getLongLong (long long &value)
 
RWSize getLongLongs (long long *arrayPt, RWSize count)
 
RWSize getLongs (long *arrayPt, RWSize count)
 
void getShort (short &value)
 
RWSize getShorts (short *arrayPt, RWSize count)
 
void getSignedChar (signed char &value)
 
RWSize getSignedChars (signed char *arrayPt, RWSize count)
 
void getSizeT (size_t &value)
 
RWSize getString (char *string, RWSize count)
 
void getUCharacter (RWUChar &value)
 
void getUnsignedChar (unsigned char &value)
 
RWSize getUnsignedChars (unsigned char *arrayPt, RWSize count)
 
void getUnsignedInt (unsigned int &value)
 
RWSize getUnsignedInts (unsigned int *arrayPt, RWSize count)
 
void getUnsignedLong (unsigned long &value)
 
RWSize getUnsignedLongLongs (unsigned long long *arrayPt, RWSize count)
 
RWSize getUnsignedLongs (unsigned long *arrayPt, RWSize count)
 
void getUnsignedShort (unsigned short &value)
 
RWSize getUnsignedShorts (unsigned short *arrayPt, RWSize count)
 
RWSize getUString (RWUChar *ustring, RWSize count)
 
void getWchar_t (wchar_t &value)
 
RWSize getWchar_ts (wchar_t *arrayPt, RWSize count)
 
void getWCharacter (wchar_t &value)
 
RWSize getWString (wchar_t *wstring, RWSize count)
 
bool isBad () const
 
bool isEof () const
 
bool isFail () const
 
bool isGood () const
 
RWDataInputStreamoperator= (const RWDataInputStream &handle)
 
RWDataInputStreamoperator>> (RWDataInputStream &(*pf)(RWDataInputStream &))
 
RWDataInputStream operator>> (RWDataInputStream(*pf)(RWDataInputStream &))
 
RWDataInputStreamoperator>> (bool &value)
 
RWDataInputStreamoperator>> (char &value)
 
RWDataInputStreamoperator>> (unsigned char &value)
 
RWDataInputStreamoperator>> (signed char &value)
 
RWDataInputStreamoperator>> (short &value)
 
RWDataInputStreamoperator>> (unsigned short &value)
 
RWDataInputStreamoperator>> (int &value)
 
RWDataInputStreamoperator>> (unsigned int &value)
 
RWDataInputStreamoperator>> (long &value)
 
RWDataInputStreamoperator>> (unsigned long &value)
 
RWDataInputStreamoperator>> (float &value)
 
RWDataInputStreamoperator>> (double &value)
 
RWDataInputStreamoperator>> (wchar_t &value)
 
RWDataInputStreamoperator>> (long long &value)
 
RWDataInputStreamoperator>> (long double &value)
 
RWSize skip (RWSize numUnits)
 
- 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
 

Static Public Member Functions

static RWTFactory1< void *, RWCString, RWSymbol > * getFactory ()
 

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

RWObjectInputStream is the handle class for object input stream implementation classes. Implements the handle idiom from the handle/body pattern. With the exception of constructors, assignment operators, and getFactory(), all member functions forward directly to the implementation associated with this handle during construction.

Constructor & Destructor Documentation

RWObjectInputStream::RWObjectInputStream ( RWObjectInputStreamImp body)
inlineexplicit

Constructor.

Parameters
bodyStream Implementation to associate with this handle.
RWObjectInputStream::RWObjectInputStream ( const RWObjectInputStream handle)
inline

Copy constructor. Throws no exceptions.

Parameters
handleData stream handle used to initialize this handle.

Member Function Documentation

void RWObjectInputStream::closeContext ( bool  readContext = true)
inline

Called by RWWithObjectInputContext dtor to close an open context.

void RWObjectInputStream::endAssoc ( )
inline

Called by the input operators for association types after each value.

void RWObjectInputStream::endBlock ( )
inline

Inputs tokens that identify the end of an object.

void RWObjectInputStream::endElement ( )
inline

Called by the input operators for collection types after each element in a sequence.

void RWObjectInputStream::endMap ( )
inline

Called by the input operators for association types after all the pairs.

void RWObjectInputStream::endMember ( )
inline

Called by streamContents() after each data member is read.

void RWObjectInputStream::endParent ( )
inline

Inputs tokens that identify the end of an parent class.

void RWObjectInputStream::endSequence ( )
inline

Called by the input operators for collection types at the end of a sequence.

static RWTFactory1<void*, RWCString, RWSymbol>* RWObjectInputStream::getFactory ( )
static

Obtains the singleton factory used to create objects dynamically from streams.

void* RWObjectInputStream::getNewObject ( const std::type_info *  base)
inline

Reads the dynamic type information (derived class) from the input stream, and factories an instance of this type.

Parameters
baseThe static type (base class) of the field being read.
void RWObjectInputStream::getString ( RWCString value)
inline

Reads an RWCString value from the stream.

Parameters
valueThe RWCString value to be read from the stream.
void RWObjectInputStream::getString ( std::string &  value)
inline

Reads a std::string value from the stream.

Parameters
valueThe std::string value to be read from the stream.
void RWObjectInputStream::getSymbol ( RWSymbol value)
inline

Reads an RWSymbol value from the stream.

Parameters
valueThe RWSymbol value to be read from the stream.
void RWObjectInputStream::getUString ( RWBasicUString value)
inline

Reads an RWBasicUString value from the stream.

Parameters
valueThe RWBasicUString value to be read from the stream.
void RWObjectInputStream::getWString ( RWWString value)
inline

Reads an RWWString value from the stream.

Parameters
valueThe RWWString value to be read from the stream.
void RWObjectInputStream::openContext ( bool  readContext = true)
inline

Called by RWWithObjectInputContext ctor to open a context in which multiple references to a single object are resolved.

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

Assignment operator. Throws no exceptions.

Parameters
handleData stream handle used to initialize this handle.
RWSymbol RWObjectInputStream::readTypeInfo ( )
inline

Reads the type information for a class instance from the stream and returns it as a symbol.

void RWObjectInputStream::rememberObject ( const void *  obj)
inline

Called by streaming operators to record each instance streamed in, in case it is referenced again in the same context.

void RWObjectInputStream::startAssocKey ( )
inline

Called by the input operators for association types before each key.

void RWObjectInputStream::startAssocValue ( )
inline

Called by the input operators for association types after each key and before each value.

RWSymbol RWObjectInputStream::startBlock ( )
inline

Inputs tokens that identify the start of a new object. Returns an RWSymbol representing the new object. Depending on the implementation class associated with this handle, the RWSymbol may be empty.

void RWObjectInputStream::startElement ( int &  position)
inline

Called by the input operators for collection types before each element in a sequence.

Parameters
positionContains the position of the element in the collection.
RWSymbol RWObjectInputStream::startMap ( int &  count,
RWStreamType keyType,
RWStreamType valueType 
)
inline

Called by the input operators for association types (hash tables, etc.) at the start of a sequence. Returns an RWSymbol representing the collection.

Parameters
countContains the number of items in the association.
keyTypeContains the type of key in the association.
valueTypeContains the type of value in the association.
bool RWObjectInputStream::startMember ( RWSymbol memberName,
RWStreamType memberType 
)
inline

Called for before each data member by the streamContents() function. Metadata about the field may or may not be read from the stream depending on the implementation. If data is read, returns true and parameter memberName will contain the name of the member; otherwise returns false.

void RWObjectInputStream::startParent ( const RWSymbol typeInfo)
inline

Inputs tokens that identify the start of a parent class.

Parameters
typeInfoIdentifies the type of the parent class, if such information is available.
RWSymbol RWObjectInputStream::startSequence ( int &  count,
RWStreamType elementType 
)
inline

Called by the input operators for collection types at the start of a sequence. Returns an RWSymbol representing the collection.

Parameters
countContains the number of items in the collection.
elementTypeContains the type of element in the collection.

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