RWObjectInputStream Class Reference
[Serialization]
Handle class for object input stream implementation classes.
More...
#include <rw/serial/RWObjectInputStream.h>
List of all members.
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
Constructor.
- Parameters:
-
| body | Stream implementation to associate with this handle. |
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] |
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] |
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] |
Assignment operator. Throws no exceptions.
- Parameters:
-
| handle | Data stream handle used to initialize this handle. |
Reads a long double
value from the stream.
- Parameters:
-
| value | The long double value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a long long
value from the stream.
- Parameters:
-
| value | The long long value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a wchar_t
value from the stream.
- Parameters:
-
| value | The wchar_t value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a char
value from the stream.
- Parameters:
-
| value | The bool value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a double
value from the stream.
- Parameters:
-
| value | The double value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a float
value from the stream.
- Parameters:
-
| value | The float value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a unsigned long
value from the stream.
- Parameters:
-
| value | The unsigned long value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a long
value from the stream.
- Parameters:
-
| value | The long value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a unsigned int
value from the stream.
- Parameters:
-
| value | The unsigned int value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a int
value from the stream.
- Parameters:
-
| value | The int value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a unsigned short
value from the stream.
- Parameters:
-
| value | The unsigned short value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a short
value from the stream.
- Parameters:
-
| value | The short value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a signed char
value from the stream.
- Parameters:
-
| value | The signed char value to be read from the stream. |
Reimplemented from RWDataInputStream.
Reads a unsigned char
value from the stream.
- Parameters:
-
| value | The unsigned char value to be read from the stream. |
Reimplemented from RWDataInputStream.
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. |
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. |
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. |
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. |