SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Base class for all object input stream implementations. More...
#include <rw/serial/RWObjectInputStreamImp.h>
Public Member Functions | |
virtual void | openContext (bool readContext=true) |
virtual void | closeContext (bool readContext=true) |
virtual RWSymbol | startBlock ()=0 |
virtual void | endBlock ()=0 |
virtual void | startParent (const RWSymbol &) |
virtual void | endParent () |
virtual void * | getNewObject (const std::type_info *base)=0 |
virtual RWSymbol | readTypeInfo ()=0 |
virtual void | rememberObject (const void *obj)=0 |
virtual bool | startMember (RWSymbol &memberName, RWStreamType &memberType)=0 |
virtual void | endMember () |
virtual RWSymbol | startSequence (int &count, RWStreamType &elementType)=0 |
virtual void | startElement (int &) |
virtual void | endElement () |
virtual void | endSequence () |
virtual RWSymbol | startMap (int &count, RWStreamType &keyType, RWStreamType &valueType)=0 |
virtual void | startAssocKey () |
virtual void | startAssocValue () |
virtual void | endAssoc () |
virtual void | endMap () |
virtual void | getSymbol (RWSymbol &value) |
virtual void | getString (RWCString &value)=0 |
virtual void | getWString (RWWString &value)=0 |
virtual void | getUString (RWBasicUString &value)=0 |
virtual void | peekChar (char &value) |
virtual void | getChar (char &value) |
virtual void | peekCharacter (char &value) |
virtual void | getCharacter (char &value) |
Protected Member Functions | |
virtual void | openOuterContext (bool readContext)=0 |
virtual void | closeOuterContext (bool readContext)=0 |
RWObjectInputStreamImp (const RWDataInputStream &sourceStream) | |
virtual RWSize | getString (char *string, RWSize count) |
virtual RWSize | getWString (wchar_t *wstring, RWSize count) |
virtual RWSize | getUString (RWUChar *ustring, RWSize count) |
Base class for all object input stream implementations. The derivation from filtered data input stream provides default implementations for output of all primitive types and allows the low level stream formatting to be controlled by delegation to a separate data input stream object.
See the corresponding handle class, RWObjectInputStream, for the description of the Object Input Stream interface.
RWObjectInputStreamImp::RWObjectInputStreamImp | ( | const RWDataInputStream & | sourceStream | ) | [inline, protected] |
Used by derived classes to initialize the attached source stream. Throws no exceptions.
sourceStream | Handle to the attached source stream. |
virtual void RWObjectInputStreamImp::closeContext | ( | bool | readContext = true |
) | [inline, virtual] |
Called by RWWithObjectInputContext dtor
to close an open context.
virtual void RWObjectInputStreamImp::closeOuterContext | ( | bool | readContext | ) | [protected, pure virtual] |
Really closes an open context, called when closeContext() calls match the number of openContext() calls.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endAssoc | ( | ) | [inline, virtual] |
Called by the input operators for association types after each value.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endBlock | ( | ) | [pure virtual] |
Causes tokens to be input that identify the end of an object.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endElement | ( | ) | [inline, virtual] |
Called by the input operators for collection types after each element in a sequence.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endMap | ( | ) | [inline, virtual] |
Called by the input operators for association types after all the pairs.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endMember | ( | ) | [inline, virtual] |
Called by streamContents() after each data member is read.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::endParent | ( | ) | [inline, virtual] |
Causes tokens to be input that identify the end of an parent class.
virtual void RWObjectInputStreamImp::endSequence | ( | ) | [inline, virtual] |
Called by the input operators for collection types at the end of a sequence.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getChar | ( | char & | value | ) | [virtual] |
Forward reading of a single char
value from the attached source stream. Value stored by peekChar() is used if available.
value | The char value is to be read from the attached source stream. |
Reimplemented from RWFilteredDataInputStreamImp.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getCharacter | ( | char & | value | ) | [virtual] |
Forward reading of a single char
value from the attached source stream. Value stored by peekCharacter() is used if available.
value | The char value to be read from the attached source stream. |
Reimplemented from RWFilteredDataInputStreamImp.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void* RWObjectInputStreamImp::getNewObject | ( | const std::type_info * | base | ) | [pure virtual] |
Reads the dynamic type information (derived class) from the input stream, and factories an instance of this type.
base | Represents the static type (base class) of the field being read. |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual RWSize RWObjectInputStreamImp::getString | ( | char * | string, | |
RWSize | count | |||
) | [inline, protected, virtual] |
Forward the reading of a string of narrow characters from the attached source stream. The function returns the number of narrow characters read.
string | A pointer to the first element of the string. The string must have been pre-allocated to contain at least count narrow characters. | |
count | The number of narrow character(s) to be read from the stream. |
Reimplemented from RWFilteredDataInputStreamImp.
Reimplemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getString | ( | RWCString & | value | ) | [pure virtual] |
Reads an RWCString value from the stream.
value | The RWCString value to be read from the stream |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getSymbol | ( | RWSymbol & | value | ) | [virtual] |
Reads an RWSymbol value from the stream.
value | The RWSymbol value to be read from the stream |
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual RWSize RWObjectInputStreamImp::getUString | ( | RWUChar * | ustring, | |
RWSize | count | |||
) | [inline, protected, virtual] |
Forward the reading of a string of UTF-16 characters from the attached source stream. The function returns the number of UTF-16 characters read.
ustring | A pointer to the first element of the string. The string must have been pre-allocated to contain at least count unicode characters. | |
count | The number of unicode character(s) to be read from the stream. |
Reimplemented from RWFilteredDataInputStreamImp.
Reimplemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getUString | ( | RWBasicUString & | value | ) | [pure virtual] |
Reads an RWBasicUString value from the stream.
value | The RWBasicUString value to be read from the stream |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual RWSize RWObjectInputStreamImp::getWString | ( | wchar_t * | wstring, | |
RWSize | count | |||
) | [inline, protected, virtual] |
Forward the reading of a string of wide characters from the attached source stream. The function returns the number of wide characters read.
wstring | A pointer to the first element of the string. The string must have been pre-allocated to contain at least count wide characters. | |
count | The number of wide character(s) to be read from the stream. |
Reimplemented from RWFilteredDataInputStreamImp.
Reimplemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::getWString | ( | RWWString & | value | ) | [pure virtual] |
Reads an RWWString value from the stream.
value | The RWWString value to be read from the stream |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::openContext | ( | bool | readContext = true |
) | [inline, virtual] |
Called by RWWithObjectInputContext ctor
to open a context in which multiple references to a single object are resolved.
virtual void RWObjectInputStreamImp::openOuterContext | ( | bool | readContext | ) | [protected, pure virtual] |
Really opens a new context, called by openContext() when a context is not already open.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::peekChar | ( | char & | value | ) | [virtual] |
Forward reading of a single char
value from the attached source stream. Value is stored for subsequent getChar
.
value | The char value to be read from the attached source stream. |
virtual void RWObjectInputStreamImp::peekCharacter | ( | char & | value | ) | [virtual] |
Forward reading of a single char
value from the attached source stream. Value is stored for subsequent getCharacter
.
value | The char value to be read from the attached source stream. |
virtual RWSymbol RWObjectInputStreamImp::readTypeInfo | ( | ) | [pure virtual] |
Reads the type information for an class instance from the stream and returns it as a symbol.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::rememberObject | ( | const void * | obj | ) | [pure virtual] |
Called by streaming operators to record each instance streamed in, in case it is referenced again in the same context.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::startAssocKey | ( | ) | [inline, virtual] |
Called by the input operators for association types before each key.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::startAssocValue | ( | ) | [inline, virtual] |
Called by the input operators for association types after each key and before each value.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual RWSymbol RWObjectInputStreamImp::startBlock | ( | ) | [pure virtual] |
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.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::startElement | ( | int & | ) | [inline, virtual] |
Called by the input operators for collection types before each element in a sequence.
Reimplemented in RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual RWSymbol RWObjectInputStreamImp::startMap | ( | int & | count, | |
RWStreamType & | keyType, | |||
RWStreamType & | valueType | |||
) | [pure virtual] |
Called by the input operators for association types (hash tables, etc.) at the start. Returns an RWSymbol representing the collection.
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. |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual bool RWObjectInputStreamImp::startMember | ( | 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 read from the stream depending on the implementation. If data is read (returning true
), then parameter memberName will contain the name of the member. Otherwise returns false
.
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
virtual void RWObjectInputStreamImp::startParent | ( | const RWSymbol & | ) | [inline, virtual] |
Causes tokens to be input that identify the start of a parent class.
virtual RWSymbol RWObjectInputStreamImp::startSequence | ( | int & | count, | |
RWStreamType & | elementType | |||
) | [pure virtual] |
Called by the input operators for collection types at the start of a sequence. Returns an RWSymbol representing the collection.
count | Contains the number of items in the collection. | |
elementType | Contains the type of element in the collection. |
Implemented in RWCompactObjectInputStreamImp, RWEnhancedXmlObjectInputStreamImp, and RWXmlObjectInputStreamImp.
© 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.