#include <XDRPersistenceManager.h>
Inheritance diagram for XDRPersistenceManager:
Public Member Functions | |
Constructors and Destructors | |
XDRPersistenceManager () throw () | |
Default constructor. | |
XDRPersistenceManager (std::istream &is) throw () | |
Detailed constructor with an input stream. | |
XDRPersistenceManager (std::ostream &os) throw () | |
Detailed constructor with an output stream. | |
XDRPersistenceManager (std::istream &is, std::ostream &os) throw () | |
Detailed constructor with an input stream and an output stream. | |
Layer 0 methods | |
virtual void | writeHeader (const char *type_name, const char *name, LongSize ptr) throw () |
Write an object header. | |
virtual bool | checkHeader (const char *type_name, const char *name, LongSize &ptr) throw () |
Check for an object header. | |
virtual void | writeTrailer (const char *name=0) throw () |
Write an object trailer. | |
virtual bool | checkTrailer (const char *name=0) throw () |
Check for an object trailer. | |
virtual void | writeStreamHeader () throw () |
Write a start marker to the output stream. | |
virtual void | writeStreamTrailer () throw () |
Write an end marker to the output stream. | |
virtual bool | checkStreamHeader () throw () |
Check for the start marker in the input stream. | |
virtual bool | checkStreamTrailer () throw () |
Check for the end marker in the output stream. | |
virtual bool | getObjectHeader (String &type_name, LongSize &ptr) throw () |
Get an (unknown) object header. | |
virtual void | writeName (const char *name) throw () |
Write a variable/member name. | |
virtual bool | checkName (const char *name) throw () |
Check for variable/member name. | |
virtual void | writeStorableHeader (const char *type_name, const char *name) throw () |
Write storable object header. | |
virtual bool | checkStorableHeader (const char *type_name, const char *name) throw () |
Check for storable object header. | |
virtual void | writePrimitiveHeader (const char *type_name, const char *name) throw () |
Write type header and name for a primitive type. | |
virtual bool | checkPrimitiveHeader (const char *type_name, const char *name) throw () |
Check for a type header and name for a primitive type. | |
virtual void | writeStorableTrailer () throw () |
Write storable object trailer. | |
virtual bool | checkStorableTrailer () throw () |
Check for storable object trailer. | |
virtual void | writePrimitiveTrailer () throw () |
Write the trailer for a primitive type. | |
virtual bool | checkPrimitiveTrailer () throw () |
Check the trailer of a primitive type. | |
virtual void | writeObjectPointerHeader (const char *type_name, const char *name) throw () |
Write header for a pointer to a PersistentObject. | |
virtual bool | checkObjectPointerHeader (const char *type_name, const char *name) throw () |
Check for header for a pointer to a PersistentObject. | |
virtual void | writeObjectReferenceHeader (const char *type_name, const char *name) throw () |
Write header for a reference to a PersistentObject. | |
virtual bool | checkObjectReferenceHeader (const char *type_name, const char *name) throw () |
Check for header for a reference to a PersistentObject. | |
virtual void | writeObjectPointerArrayHeader (const char *type_name, const char *name, Size size) throw () |
Write header for an array of pointers to PersistentObjects. | |
virtual bool | checkObjectPointerArrayHeader (const char *type_name, const char *name, Size &size) throw () |
Check for header for an array of pointers to PersistentObjects. | |
virtual void | writeObjectPointerArrayTrailer () throw () |
Write trailer for an array of pointers to PersistentObjects. | |
virtual bool | checkObjectPointerArrayTrailer () throw () |
Check for trailer for an array of pointers to PersistentObjects. | |
virtual void | initializeOutputStream () throw () |
Prepare the stream for output. | |
virtual void | finalizeOutputStream () throw () |
Prepare the stream for closing. | |
virtual void | initializeInputStream () throw () |
Prepare the stream for output. | |
virtual void | finalizeInputStream () throw () |
Prepare the stream for closing. | |
Put methods for primitive data types. | |
virtual void | put (const char c) throw () |
Write a signed char to the output stream. | |
virtual void | put (const Byte b) throw () |
Write a single byte the output stream. | |
virtual void | put (const Index i) throw () |
Write an Index to the output stream. | |
virtual void | put (const Size s) throw () |
Write a Size or a Position to the output stream. | |
virtual void | put (const bool b) throw () |
Write a boolean value to the output stream. | |
virtual void | put (const Real f) throw () |
Write a single precision floating point number to the output stream. | |
virtual void | put (const DoubleReal d) throw () |
Write a double precision floating point number to the output stream. | |
virtual void | put (const string &s) throw () |
Write a string to the output. | |
virtual void | put (const LongSize p) throw () |
Write a pointer to the output. | |
Get methods for primitive data types. | |
virtual void | get (char &c) throw () |
Read a signed char from the input stream. | |
virtual void | get (Byte &c) throw () |
Read a single byte from the input stream. | |
virtual void | get (Index &s) throw () |
Read an Index from the input stream. | |
virtual void | get (Size &s) throw () |
Read a Size or a Position from the input stream. | |
virtual void | get (bool &b) throw () |
Read a boolean value from the input stream. | |
virtual void | get (Real &f) throw () |
Read a single precision floating point number from the input stream. | |
virtual void | get (DoubleReal &d) throw () |
Read a double precision floating point number from the input stream. | |
virtual void | get (string &s) throw () |
Read a string from the output stream. | |
virtual void | get (LongSize &p) throw () |
Read a pointer from the input stream. | |
Static Public Attributes | |
Constants | |
const Size | STREAM_HEADER |
A constant value used to mark the beginning of a persistent stream. | |
const Size | STREAM_TRAILER |
A constant value used to mark the end of a persistent stream. | |
const Size | OBJECT_HEADER |
A constant value used to mark the beginning of an object. | |
const Size | OBJECT_TRAILER |
A constant value used to mark the end of an object. |
This class implements a persistence manager that reads and writes its objects in a portable binary format.
|
Default constructor.
|
|
Detailed constructor with an input stream and an output stream.
|
|
Check for an object header.
This method reads an int form the input stream (using Implements PersistenceManager. |
|
Check for variable/member name.
Implements PersistenceManager. |
|
Check for header for an array of pointers to PersistentObjects.
Implements PersistenceManager. |
|
Check for trailer for an array of pointers to PersistentObjects.
Implements PersistenceManager. |
|
Check for header for a pointer to a PersistentObject.
Implements PersistenceManager. |
|
Check for header for a reference to a PersistentObject.
Implements PersistenceManager. |
|
Check for a type header and name for a primitive type.
Implements PersistenceManager. |
|
Check the trailer of a primitive type.
Implements PersistenceManager. |
|
Check for storable object header.
Implements PersistenceManager. |
|
Check for storable object trailer.
Implements PersistenceManager. |
|
Check for the start marker in the input stream.
Implements PersistenceManager. |
|
Check for the end marker in the output stream.
Implements PersistenceManager. |
|
Check for an object trailer.
This method reads an int form the input stream (using Implements PersistenceManager. |
|
Prepare the stream for closing. This method destroys the XDR output stream (using xdr_destroy). Reimplemented from PersistenceManager. |
|
Prepare the stream for closing. This method destroys the XDR output stream (using xdr_destroy). Reimplemented from PersistenceManager. |
|
Read a pointer from the input stream.
Implements PersistenceManager. |
|
Read a string from the output stream.
Implements PersistenceManager. |
|
Read a double precision floating point number from the input stream.
Implements PersistenceManager. |
|
Read a single precision floating point number from the input stream.
Implements PersistenceManager. |
|
Read a boolean value from the input stream.
Implements PersistenceManager. |
|
Read a Size or a Position from the input stream.
Implements PersistenceManager. |
|
Read an Index from the input stream.
Implements PersistenceManager. |
|
Read a single byte from the input stream.
Implements PersistenceManager. |
|
Read a signed char from the input stream.
Implements PersistenceManager. |
|
Get an (unknown) object header.
Implements PersistenceManager. |
|
Prepare the stream for output. This method creates an XDR output stream (using xdrrec_create) and prepares it for output. Reimplemented from PersistenceManager. |
|
Prepare the stream for output. This method creates an XDR output stream (using xdrrec_create) and prepares it for output. Reimplemented from PersistenceManager. |
|
Write a pointer to the output.
Implements PersistenceManager. |
|
Write a string to the output.
Implements PersistenceManager. |
|
Write a double precision floating point number to the output stream.
Implements PersistenceManager. |
|
Write a single precision floating point number to the output stream.
Implements PersistenceManager. |
|
Write a boolean value to the output stream.
Implements PersistenceManager. |
|
Write a Size or a Position to the output stream.
Implements PersistenceManager. |
|
Write an Index to the output stream.
Implements PersistenceManager. |
|
Write a single byte the output stream.
Implements PersistenceManager. |
|
Write a signed char to the output stream.
Implements PersistenceManager. |
|
Write an object header.
This method stores OBJECT_HEADER as an int value to mark the start of an object (using Implements PersistenceManager. |
|
Write a variable/member name.
Implements PersistenceManager. |
|
Write header for an array of pointers to PersistentObjects.
Implements PersistenceManager. |
|
Write trailer for an array of pointers to PersistentObjects.
Implements PersistenceManager. |
|
Write header for a pointer to a PersistentObject.
Implements PersistenceManager. |
|
Write header for a reference to a PersistentObject.
Implements PersistenceManager. |
|
Write type header and name for a primitive type.
Implements PersistenceManager. |
|
Write the trailer for a primitive type.
Implements PersistenceManager. |
|
Write storable object header.
Implements PersistenceManager. |
|
Write storable object trailer.
Implements PersistenceManager. |
|
Write a start marker to the output stream.
Implements PersistenceManager. |
|
Write an end marker to the output stream.
Implements PersistenceManager. |
|
Write an object trailer.
This method stores OBJECT_TRAILER as an int value to mark the start of an object (using Implements PersistenceManager. |