rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWObjectOutputStreamImp Class Reference
[Serialization]

Base class for all object output streams implementations. More...

#include <rw/serial/RWObjectOutputStreamImp.h>

Inheritance diagram for RWObjectOutputStreamImp:
RWFilteredDataOutputStreamImp RWDataOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock > RWCompactObjectOutputStreamImp RWEnhancedXmlObjectOutputStreamImp RWXmlObjectOutputStreamImp RWTParsedTransformObjectOutputStreamImp< Transform > RWTTransformObjectOutputStreamImp< Transform >

List of all members.

Public Member Functions

virtual void openContext (bool writeContext=true)
virtual void closeContext (bool writeContext=true)
virtual void startBlock (const RWSymbol &typeInfo)=0
virtual void endBlock ()=0
virtual void startParent (const RWSymbol &)
virtual void endParent ()
virtual bool needToWrite (const void *obj)=0
virtual void writeNullPtr ()=0
virtual void newObjectMarker ()=0
virtual void writeTypeInfo (const RWSymbol &typeInfo)=0
virtual void rememberObject (const void *obj)=0
virtual void writeMemberInfo (const RWSymbol &memberName, RWStreamType memberType)=0
virtual void endMember (const RWSymbol &)
virtual void startSequence (int count, RWStreamType elementType, const RWSymbol &typeInfo)=0
virtual void startElement (int)
virtual void endElement ()
virtual void endSequence ()
virtual void startMap (int count, RWStreamType keyType, RWStreamType valueType, const RWSymbol &typeInfo)=0
virtual void startAssocKey ()
virtual void startAssocValue ()
virtual void endAssoc ()
virtual void endMap ()
virtual void putSymbol (const RWSymbol &sym)
virtual void putString (const RWCString &str)=0
virtual void putWString (const RWWString &str)=0
virtual void putUString (const RWBasicUString &str)=0
virtual void setNameForNextObject (const RWCString &str)=0

Protected Member Functions

 RWObjectOutputStreamImp (const RWDataOutputStream &sinkStream)
virtual void openOuterContext (bool writeContext)=0
virtual void closeOuterContext (bool writeContext)=0
virtual void putString (const char *string, RWSize count)
virtual void putWString (const wchar_t *wstring, RWSize count)
virtual void putUString (const RWUChar *ustring, RWSize count)
int getContextNestingLevel ()

Protected Attributes

RWCString nameForNextObject_

Detailed Description

Base class for all object output stream implementations. Inherits default operations for streaming primitives from the data output stream.

See the corresponding handle class, RWObjectOutputStream, for the description of the object output stream interface.


Constructor & Destructor Documentation

RWObjectOutputStreamImp::RWObjectOutputStreamImp ( const RWDataOutputStream sinkStream  )  [inline, protected]

Used by derived classes to initialize the next processing stream. Throws no exceptions.

Parameters:
sinkStream A handle to the next processing stream.

Member Function Documentation

virtual void RWObjectOutputStreamImp::closeContext ( bool  writeContext = true  )  [inline, virtual]

Called by RWWithObjectOutputContext dtor to close an open context.

virtual void RWObjectOutputStreamImp::closeOuterContext ( bool  writeContext  )  [protected, pure virtual]

Really closes an open context. This function is called when the number of closeContext() calls matches the number of openContext() calls.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endAssoc (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endBlock (  )  [pure virtual]

Causes tokens to be output that identify the end of an object.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endElement (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endMap (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endMember ( const RWSymbol  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::endParent (  )  [inline, virtual]

Causes tokens to be output that identify the end of an parent class.

virtual void RWObjectOutputStreamImp::endSequence (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

int RWObjectOutputStreamImp::getContextNestingLevel (  )  [inline, protected]

Returns the current context nesting level. 0 indicates no open context.

virtual bool RWObjectOutputStreamImp::needToWrite ( const void *  obj  )  [pure virtual]

Returns true when the referenced object has not yet been written to the stream in the current context. Otherwise, tokens are output identifying this object as a previously streamed one, and the function returns false.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::newObjectMarker (  )  [pure virtual]

Output is a token indicating that an object will be created by the factory.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::openContext ( bool  writeContext = true  )  [inline, virtual]

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

virtual void RWObjectOutputStreamImp::openOuterContext ( bool  writeContext  )  [protected, pure virtual]

Really opens a new context. This function is called by openContext() when a context is not already open.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::putString ( const char *  string,
RWSize  count 
) [inline, protected, virtual]

Forwards the writing of a narrow character string, including embedded nulls, starting at string to the next processing stream.

Parameters:
string A pointer to the narrow string's first character.
count The number of narrow character(s) to be written to the stream.

Reimplemented from RWFilteredDataOutputStreamImp.

Reimplemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::putString ( const RWCString str  )  [pure virtual]
virtual void RWObjectOutputStreamImp::putSymbol ( const RWSymbol sym  )  [virtual]

Writes an RWSymbol to the stream.

virtual void RWObjectOutputStreamImp::putUString ( const RWUChar ustring,
RWSize  count 
) [inline, protected, virtual]

Forwards the writing of a UTF-16 character string, including embedded nulls, starting at ustring to the next processing stream.

Parameters:
ustring A pointer to the string's first unicode character.
count The number of unicode character(s) to be written to the stream.

Reimplemented from RWFilteredDataOutputStreamImp.

Reimplemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::putUString ( const RWBasicUString str  )  [pure virtual]
virtual void RWObjectOutputStreamImp::putWString ( const wchar_t *  wstring,
RWSize  count 
) [inline, protected, virtual]

Forwards the writing of a wide character string, including embedded nulls, starting at wstring to the next processing stream.

Parameters:
wstring A pointer to the string's first wide character.
count The number of wide character(s) to be written to the stream.

Reimplemented from RWFilteredDataOutputStreamImp.

Reimplemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::putWString ( const RWWString str  )  [pure virtual]
virtual void RWObjectOutputStreamImp::rememberObject ( const void *  obj  )  [pure virtual]

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

Parameters:
obj Holds the address of the instance.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::setNameForNextObject ( const RWCString str  )  [pure virtual]

Sets up the instance name for the next object to be written out.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startAssocKey (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startAssocValue (  )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startBlock ( const RWSymbol typeInfo  )  [pure virtual]

Causes tokens to be output that identify the start of a new object.

Parameters:
typeInfo Identifies the type of the new object, if such information is available.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startElement ( int   )  [inline, virtual]

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

Reimplemented in RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startMap ( int  count,
RWStreamType  keyType,
RWStreamType  valueType,
const RWSymbol typeInfo 
) [pure virtual]

Called by the output operators for association types (hash tables, etc.) at the start.

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.
typeInfo Contains the type of the association(collection) itself

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::startParent ( const RWSymbol  )  [inline, virtual]

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

virtual void RWObjectOutputStreamImp::startSequence ( int  count,
RWStreamType  elementType,
const RWSymbol typeInfo 
) [pure virtual]

Called by the output operators for collection types at the start of a sequence.

Parameters:
count Contains the number of items in the collection.
elementType Contains the type of element in the collection.
typeInfo Contains the type of the collection itself.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::writeMemberInfo ( const RWSymbol memberName,
RWStreamType  memberType 
) [pure virtual]

Called for before each data member by the streamContents() function. Metadata about the field may or may not be written to the stream, depending on the implementation. This function returns true if data is actually written out. Otherwise, it returns false.

Parameters:
memberName Identifies the name of the member.
memberType Identifies the type of the member.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::writeNullPtr (  )  [pure virtual]

Output is a token representing a null pointer.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.

virtual void RWObjectOutputStreamImp::writeTypeInfo ( const RWSymbol typeInfo  )  [pure virtual]

Outputs the type information required to factory an object of the correct dynamic type (derived class) on input.

Parameters:
typeInfo Identifies the type of the new object, if such information is available.

Implemented in RWCompactObjectOutputStreamImp, RWEnhancedXmlObjectOutputStreamImp, and RWXmlObjectOutputStreamImp.


Member Data Documentation

The name for the next object inserted or extracted. This name will be cleared as soon as an object has been written or read, and ignored if empty.

 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.