Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 619

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

\section{ost::Base\-Object Class Reference}
\label{classost_1_1_base_object}\index{ost::BaseObject@{ost::BaseObject}}
Base\-Object\-Base class for classes that will be persistent.  


{\tt \#include $<$persist.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Base\-Object} ()
\begin{CompactList}\small\item\em This constructor is used in serialisation processes. \item\end{CompactList}\item 
virtual {\bf $\sim$Base\-Object} ()
\begin{CompactList}\small\item\em Default destructor. \item\end{CompactList}\item 
virtual const char $\ast$ {\bf get\-Persistence\-ID} () const 
\begin{CompactList}\small\item\em This returns the ID of the persistent object (Its type). \item\end{CompactList}\item 
virtual bool {\bf write} ({\bf Engine} \&archive) const 
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
virtual bool {\bf read} ({\bf Engine} \&archive)
\begin{CompactList}\small\item\em This method is used to read from a Persistence::Engine It is not equivalent to the $>$$>$ operator as it does no typesafety or anything. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Base\-Object\-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::Type\-Manager 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.

\begin{Desc}
\item[Author:]Daniel Silverstone \end{Desc}




\subsection{Constructor \& Destructor Documentation}
\index{ost::BaseObject@{ost::Base\-Object}!BaseObject@{BaseObject}}
\index{BaseObject@{BaseObject}!ost::BaseObject@{ost::Base\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Base\-Object::Base\-Object ()}\label{classost_1_1_base_object_5c82b7bc43a0860b394d10f16facb840}


This constructor is used in serialisation processes. 

It is called in Create\-New\-Instance in order to create an instance of the class to have Read() called on it. \index{ost::BaseObject@{ost::Base\-Object}!~BaseObject@{$\sim$BaseObject}}
\index{~BaseObject@{$\sim$BaseObject}!ost::BaseObject@{ost::Base\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::Base\-Object::$\sim$Base\-Object ()\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_base_object_d525c478d9de4a2f4f509aecb6762f05}


Default destructor. 



\subsection{Member Function Documentation}
\index{ost::BaseObject@{ost::Base\-Object}!getPersistenceID@{getPersistenceID}}
\index{getPersistenceID@{getPersistenceID}!ost::BaseObject@{ost::Base\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual const char$\ast$ ost::Base\-Object::get\-Persistence\-ID () const\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_base_object_018e6d811703fe0eee6caaff9e0bdd0e}


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

\index{ost::BaseObject@{ost::Base\-Object}!read@{read}}
\index{read@{read}!ost::BaseObject@{ost::Base\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool ost::Base\-Object::read ({\bf Engine} \& {\em archive})\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_base_object_7334c7573cdee399d7d17be956ef2f48}


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

\index{ost::BaseObject@{ost::Base\-Object}!write@{write}}
\index{write@{write}!ost::BaseObject@{ost::Base\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool ost::Base\-Object::write ({\bf Engine} \& {\em archive}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_base_object_97719386fd53d191444ee34933f9c42b}


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. 



The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf persist.h}\end{CompactItemize}