#include <persistentObject.h>
Inheritance diagram for PersistentObject:
Public Member Functions | |
Constructors and Destructors | |
PersistentObject () throw () | |
Default constructor. | |
virtual | ~PersistentObject () throw () |
Destructor. | |
Persistent Writing and Reading | |
PersistenceManager & | operator>> (PersistenceManager &pm) const throw (Exception::GeneralException) |
Stream operator. | |
virtual void | persistentWrite (PersistenceManager &pm, const char *name="") const throw (Exception::GeneralException) |
Serialize the object. | |
virtual void | persistentRead (PersistenceManager &pm) throw (Exception::GeneralException) |
Deserialize the object. | |
virtual void | finalize () throw (Exception::GeneralException) |
Finalize the deserialization. |
Each object that needs persistence, has to be derived from PersistentObject to define an interface to the PersistenceManager .
operator >>
.
|
Default constructor. The default constructor has no functionality. |
|
Destructor. The destructor has no functionality. |
|
Finalize the deserialization.
This method is called for all objects after their pointers have been demangled. It is intended for the adaptation of internal data structures. For example, the bond class has to swap Reimplemented in Bond. |
|
Stream operator.
This operator is used to serialize an instance of PersistentObject. The method first calls
|
|
Deserialize the object. This method reads the contents of an persistent object into an (already existing!) object. It is implemented using Layer 1 commands of PersistenceManager. To each write command used in persistentWrite, there should be exactly the same call to a read command in persistentRead. Only the header and trailer (writeObjectHeader/writeObjectTrailer calls) have to be omitted, as the header is read before this method is called (the object type has to be known in advance to dynamically create the object).
Reimplemented in Composite, NamedProperty, Atom, AtomContainer, Bond, Chain, Fragment, Molecule, NucleicAcid, Nucleotide, PDBAtom, Protein, Residue, SecondaryStructure, System, TVector2< T >, and TVector2< float >. |
|
Serialize the object.
This method serializes the object by calls to Layer 1 methods of PersistenceManager . The first method in the implementation of persistentRead should be a call to
Reimplemented in Composite, NamedProperty, Atom, AtomContainer, Bond, Chain, Fragment, Molecule, NucleicAcid, Nucleotide, PDBAtom, Protein, Residue, SecondaryStructure, System, TVector2< T >, and TVector2< float >. |