rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWObjectInputStream Class Reference
[Serialization]

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

#include <rw/serial/RWObjectInputStream.h>

Inheritance diagram for RWObjectInputStream:
RWDataInputStream RWHandleBase

List of all members.

Public Member Functions

 RWObjectInputStream (RWObjectInputStreamImp *body)
 RWObjectInputStream (const RWObjectInputStream &handle)
RWObjectInputStreamoperator= (const RWObjectInputStream &handle)
void openContext (bool readContext=true)
void closeContext (bool readContext=true)
RWSymbol startBlock ()
void endBlock ()
void startParent (const RWSymbol &typeInfo)
void endParent ()
void * getNewObject (const std::type_info *base)
RWSymbol readTypeInfo ()
void rememberObject (const void *obj)
bool startMember (RWSymbol &memberName, RWStreamType &memberType)
void endMember ()
RWSymbol startSequence (int &count, RWStreamType &elementType)
void startElement (int &position)
void endElement ()
void endSequence ()
RWSymbol startMap (int &count, RWStreamType &keyType, RWStreamType &valueType)
void startAssocKey ()
void startAssocValue ()
void endAssoc ()
void endMap ()
void getSymbol (RWSymbol &value)
void getString (RWCString &value)
void getString (std::string &value)
void getWString (RWWString &value)
void getUString (RWBasicUString &value)
RWObjectInputStreamoperator>> (char &value)
RWObjectInputStreamoperator>> (unsigned char &value)
RWObjectInputStreamoperator>> (signed char &value)
RWObjectInputStreamoperator>> (short &value)
RWObjectInputStreamoperator>> (unsigned short &value)
RWObjectInputStreamoperator>> (int &value)
RWObjectInputStreamoperator>> (unsigned int &value)
RWObjectInputStreamoperator>> (long &value)
RWObjectInputStreamoperator>> (unsigned long &value)
RWObjectInputStreamoperator>> (float &value)
RWObjectInputStreamoperator>> (double &value)
RWObjectInputStreamoperator>> (bool &value)
RWObjectInputStreamoperator>> (wchar_t &value)
RWObjectInputStreamoperator>> (long long &value)
RWObjectInputStreamoperator>> (long double &value)

Static Public Member Functions

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

Detailed Description

RWObjectInputStream is the handle class for object input stream imp 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  )  [inline, explicit]

Constructor.

Parameters:
body Stream implementation to associate with this handle.
RWObjectInputStream::RWObjectInputStream ( const RWObjectInputStream handle  )  [inline]

Copy constructor. Throws no exceptions.

Parameters:
handle Data 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]

Causes tokens to be input 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]

Causes tokens to be input 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:
base The static type (base class) of the field being read.
void RWObjectInputStream::getString ( std::string &  value  )  [inline]

Reads a std::string value from the stream.

Parameters:
value The std::string value to be read from the stream.
void RWObjectInputStream::getString ( RWCString value  )  [inline]

Reads an RWCString value from the stream.

Parameters:
value The RWCString value to be read from the stream.
void RWObjectInputStream::getSymbol ( RWSymbol value  )  [inline]

Reads an RWSymbol value from the stream.

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

Reads an RWBasicUString value from the stream.

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

Reads an RWWString value from the stream.

Parameters:
value The 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:
handle Data stream handle used to initialize this handle.
RWObjectInputStream& RWObjectInputStream::operator>> ( long double &  value  )  [inline]

Reads a long double value from the stream.

Parameters:
value The long double value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( long long &  value  )  [inline]

Reads a long long value from the stream.

Parameters:
value The long long value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( wchar_t &  value  )  [inline]

Reads a wchar_t value from the stream.

Parameters:
value The wchar_t value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( bool &  value  )  [inline]

Reads a char value from the stream.

Parameters:
value The bool value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( double &  value  )  [inline]

Reads a double value from the stream.

Parameters:
value The double value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( float &  value  )  [inline]

Reads a float value from the stream.

Parameters:
value The float value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( unsigned long &  value  )  [inline]

Reads a unsigned long value from the stream.

Parameters:
value The unsigned long value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( long &  value  )  [inline]

Reads a long value from the stream.

Parameters:
value The long value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( unsigned int &  value  )  [inline]

Reads a unsigned int value from the stream.

Parameters:
value The unsigned int value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( int &  value  )  [inline]

Reads a int value from the stream.

Parameters:
value The int value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( unsigned short &  value  )  [inline]

Reads a unsigned short value from the stream.

Parameters:
value The unsigned short value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( short &  value  )  [inline]

Reads a short value from the stream.

Parameters:
value The short value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( signed char &  value  )  [inline]

Reads a signed char value from the stream.

Parameters:
value The signed char value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( unsigned char &  value  )  [inline]

Reads a unsigned char value from the stream.

Parameters:
value The unsigned char value to be read from the stream.

Reimplemented from RWDataInputStream.

RWObjectInputStream& RWObjectInputStream::operator>> ( char &  value  )  [inline]

Reads a char value from the stream.

Parameters:
value The char value to be read from the stream.

Reimplemented from RWDataInputStream.

RWSymbol RWObjectInputStream::readTypeInfo (  )  [inline]

Reads the type information for an 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]

Causes tokens to be input 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:
position Contains 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. Returns an RWSymbol representing the collection.

Parameters:
count Contains the number of items in the association.
keyType Contains the type of key in the association.
valueType Contains 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]

Causes tokens to be input that identify the start of a parent class.

Parameters:
typeInfo Identifies 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:
count Contains the number of items in the collection.
elementType Contaisn the type of element in the collection.
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.