Module: Advanced Tools Package: Serialization
RWObjectInputStreamImp RWFilteredDataInputStreamImp
#include <rw/serial/RWObjectInputStreamImp.h>
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(RWDataInputStream& sourceStream);
Used by derived classes to initialize the attached source stream. Throws no exceptions.
Parameter List
sourceStream |
Handle to the attached source stream |
virtual void getString(RWCString& value) =0;
Reads an RWCString value from the stream.
Parameter List
value |
The RWCString value to be read from the stream |
virtual void getUString(RWBasicUString& value);
Reads an RWBasicUString value from the stream.
Parameter List
value |
The RWUString value to be read from the stream |
virtual void getWString(RWWString& value);
Reads an RWWString value from the stream.
Parameter List
value |
The RWWString value to be read from the stream. |
virtual void getSymbol(RWSymbol& value);
Reads an RWSymbol value from the stream.
Parameter List
value |
The RWSymbol value to be read from the stream. |
bool startMember(RWSymbol& memberName, RWStreamType& memberType);
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.
RWSymbol startBlock();
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.
RWSymbol startMap(int& count, RWStreamType& keyType,
RWStreamType& valueType);
Called by the input operators for association types (hash tables, etc.) at the start. Returns an RWSymbol representing the collection.
Parameter List
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. |
RWSymbol startSequence(int& count, RWStreamType& elementType);
Called by the input operators for collection types at the start of a sequence. Returns an RWSymbol representing the collection.
Parameter List
count |
Contains the number of items in the collection. |
elementType |
Contains the type of element in the collection. |
RWSymbol readTypeInfo();
Reads the type information for an class instance from the stream and returns it as a symbol.
static RWTCountingPointer<RWTFactory1<void*, RWCString, RWSymbol>, RWSafeCounter>& getFactory();
Obtains the singleton factory used to create objects dynamically from streams.
void closeContext(bool readContext = true);
Called by RWWithObjectInputContext dtor to close an open context.
void endAssoc();
Called by the input operators for association types after each value.
void endBlock();
Causes tokens to be input that identify the end of an object.
void endElement();
Called by the input operators for collection types after each element in a sequence.
void endMap();
Called by the input operators for association types after all the pairs.
void endMember();
Called by streamContents() after each data member is read.
void endParent();
Causes tokens to be input that identify the end of an parent class.
void endSequence();
Called by the input operators for collection types at the end of a sequence.
void getString(RWCString& value);
Reads an RWCString value from the stream.
void getWString(RWWString& value);
Reads an RWWString value from the stream.
void getSymbol(RWSymbol& value);
Reads an RWSymbol value from the stream.
void openContext(bool readContext = true);
Called by RWWithObjectInputContext ctor to open a context in which multiple references to a single object are resolved.
void rememberObject(const void* obj);
Called by streaming operators to record each instance streamed in, in case it is referenced again in the same context.
void startAssocKey();
Called by the input operators for association types before each key.
void startAssocValue();
Called by the input operators for association types after each key and before each value.
void startElement(int& position);
Called by the input operators for collection types before each element in a sequence.
Parameter List
position |
Contains the position of the element in the collection. |
void startParent(const RWSymbol& typeInfo);
Causes tokens to be input that identify the start of a parent class.
Parameter List
typeInfo |
Identifies the type of the parent class, if such information is available. |
void* getNewObject(const type_info* base);
Reads the dynamic type information (derived class) from the input stream, and factories an instance of this type.
Parameter List
base |
Represents the static type (base class) of the field being read. |
virtual void closeOuterContext(bool readContext) = 0;
Really closes an open context, called when closeContext() calls match the number of openContext() calls.
virtual void openOuterContext(bool readContext) = 0;
Really opens a new context, called by openContext() when a context is not already open.
virtual void getChar(char& value);
Forward reading of a single char value from the attached source stream. Value stored by peekChar() is used if available.
Parameter List
value |
The char value is to be read from the attached source stream. |
virtual void getCharacter(char& value);
Forward reading of a single char value from the attached source stream. Value stored by peekCharacter() is used if available.
Parameter List
value |
The char value is to be read from the attached source stream. |
virtual void peekChar(char& value);
Forward reading of a single char value from the attached source stream. Value is stored for subsequent getChar.
Parameter List
value |
The char value is to be read from the attached source stream. |
virtual void PeekCharacter(char& value);
Forward reading of a single char value from the attached source stream. Value is stored for subsequent getCharacter.
Parameter List
value |
The char value is to be read from the attached source stream. |
© 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.