Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

BaseObject Class Reference

BaseObject Base class for classes that will be persistent. More...

#include <persist.h>

List of all members.

Public Member Functions

 CCXX_MEMBER_EXPORT (CCXX_EMPTY) BaseObject()
 This constructor is used in serialisation processes.

 CCXX_MEMBER_EXPORT (virtual)~BaseObject()
 Default destructor.

 CCXX_MEMBER_EXPORT (virtual const char *) getPersistenceID() const
 This returns the ID of the persistent object (Its type).

 CCXX_MEMBER_EXPORT (virtual bool) write(Engine &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.

 CCXX_MEMBER_EXPORT (virtual bool) read(Engine &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.


Detailed Description

BaseObject Base class for classes that will be persistent.

This object is the base for all Persistent data which is not natively serialised 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


Member Function Documentation

BaseObject::CCXX_MEMBER_EXPORT virtual  bool  ) 
 

This method is used to read from a Persistence::Engine It is not equivalent to the >> operator as it does no typesafety or anything.

BaseObject::CCXX_MEMBER_EXPORT virtual  bool  )  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.

BaseObject::CCXX_MEMBER_EXPORT virtual const char *   )  const
 

This returns the ID of the persistent object (Its type).

BaseObject::CCXX_MEMBER_EXPORT virtual   ) 
 

Default destructor.

BaseObject::CCXX_MEMBER_EXPORT CCXX_EMPTY   ) 
 

This constructor is used in serialisation 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:
Generated on Fri Feb 27 11:37:10 2004 for GNU CommonC++ by doxygen 1.3.5