UCommon
Public Member Functions
ost::PersistObject Class Reference

PersistObject. More...

#include <persist.h>

Public Member Functions

virtual const char * getPersistenceID () const
 This returns the ID of the persistent object (Its type)
 
 PersistObject ()
 This constructor is used in serialization processes. More...
 
virtual bool read (PersistEngine &archive)
 This method is used to read from a Persistence::Engine It is not equivalent to the >> operator as it does no typesafety or anything.
 
virtual bool write (PersistEngine &archive) const
 This method is used to write to the Persistence::Engine It is not equivalent to the << operator as it writes only the data and not the object type etc.
 
virtual ~PersistObject ()
 Default destructor.
 

Detailed Description

PersistObject.

Base class for classes that will be persistent. This object is the base for all Persistent data which is not natively serialized by the persistence::engine

It registers itself with the persistence::TypeManager using a global constructor function. A matching deregister call is made in a global destructor, to allow DLL's to use the persistence::engine in a main executable.

Persistable objects must never maintain bad pointers. If a pointer doesn't point to something valid, it must be NULL. This is so the persistence engine knows whether to allocate memory for an object or whether the memory has been pre-allocated.

Author
Daniel Silverstone

Definition at line 151 of file persist.h.

Constructor & Destructor Documentation

◆ PersistObject()

ost::PersistObject::PersistObject ( )

This constructor is used in serialization processes.

It is called in CreateNewInstance in order to create an instance of the class to have Read() called on it.


The documentation for this class was generated from the following file: