Sophie

Sophie

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

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

\section{persist.h File Reference}
\label{persist_8h}\index{persist.h@{persist.h}}
Persistence library classes. 

{\tt \#include $<$cc++/config.h$>$}\par
{\tt \#include $<$cc++/exception.h$>$}\par
{\tt \#include $<$cc++/missing.h$>$}\par
{\tt \#include $<$cc++/string.h$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$string$>$}\par
{\tt \#include $<$vector$>$}\par
{\tt \#include $<$deque$>$}\par
{\tt \#include $<$map$>$}\par
\subsection*{Namespaces}
\begin{CompactItemize}
\item 
namespace {\bf ost}
\end{CompactItemize}
\subsection*{Classes}
\begin{CompactItemize}
\item 
class {\bf ost::Type\-Manager}
\begin{CompactList}\small\item\em This class manages the types for generation of the persistent objects.Type manager for persistence engine. \item\end{CompactList}\item 
class {\bf ost::Type\-Manager::Registration}
\begin{CompactList}\small\item\em This manages a registration to the typemanager - attempting to remove problems with the optimisers. \item\end{CompactList}\item 
class {\bf ost::Base\-Object}
\begin{CompactList}\small\item\em Base\-Object\-Base class for classes that will be persistent. \item\end{CompactList}\item 
class {\bf ost::Engine}
\begin{CompactList}\small\item\em Enginestream serialization of persistent classes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf NO\_\-COMPRESSION}
\item 
\#define {\bf NS\_\-PREFIX}~ost::
\item 
\#define {\bf DECLARE\_\-PERSISTENCE}(Class\-Type)
\item 
\#define {\bf IMPLEMENT\_\-PERSISTENCE}(Class\-Type, Fully\-Qualified\-Name)
\item 
\#define {\bf CCXX\_\-ENGINEWRITE\_\-REF}(valref)~write\-Binary((const {\bf uint8}$\ast$)\&valref,sizeof(valref))
\item 
\#define {\bf CCXX\_\-ENGINEREAD\_\-REF}(valref)~read\-Binary(({\bf uint8}$\ast$)\&valref,sizeof(valref))
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef Base\-Object $\ast$($\ast$ {\bf ost::New\-Base\-Object\-Function} )(void)
\end{CompactItemize}


\subsection{Detailed Description}
Persistence library classes. 



\subsection{Define Documentation}
\index{persist.h@{persist.h}!CCXX_ENGINEREAD_REF@{CCXX\_\-ENGINEREAD\_\-REF}}
\index{CCXX_ENGINEREAD_REF@{CCXX\_\-ENGINEREAD\_\-REF}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define CCXX\_\-ENGINEREAD\_\-REF(valref)~read\-Binary(({\bf uint8}$\ast$)\&valref,sizeof(valref))}\label{persist_8h_7df6645fae18e96d06803c9e110b5f15}


\index{persist.h@{persist.h}!CCXX_ENGINEWRITE_REF@{CCXX\_\-ENGINEWRITE\_\-REF}}
\index{CCXX_ENGINEWRITE_REF@{CCXX\_\-ENGINEWRITE\_\-REF}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define CCXX\_\-ENGINEWRITE\_\-REF(valref)~write\-Binary((const {\bf uint8}$\ast$)\&valref,sizeof(valref))}\label{persist_8h_2c0cd884a6ed71a178ef1569190c5e16}


\index{persist.h@{persist.h}!DECLARE_PERSISTENCE@{DECLARE\_\-PERSISTENCE}}
\index{DECLARE_PERSISTENCE@{DECLARE\_\-PERSISTENCE}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define DECLARE\_\-PERSISTENCE(Class\-Type)}\label{persist_8h_0063bc0eb4e47f3fd4b0662d31656838}


{\bf Value:}

\footnotesize\begin{verbatim}public:                                                         \
    friend NS_PREFIX Engine& operator>>( NS_PREFIX Engine& ar, ClassType *&ob);         \
    friend NS_PREFIX Engine& operator<<( NS_PREFIX Engine& ar, ClassType const &ob);    \
    friend NS_PREFIX BaseObject *createNew##ClassType();                                \
    virtual const char* getPersistenceID() const;                       \
    static NS_PREFIX TypeManager::Registration registrationFor##ClassType;
\end{verbatim}\normalsize 
\index{persist.h@{persist.h}!IMPLEMENT_PERSISTENCE@{IMPLEMENT\_\-PERSISTENCE}}
\index{IMPLEMENT_PERSISTENCE@{IMPLEMENT\_\-PERSISTENCE}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IMPLEMENT\_\-PERSISTENCE(Class\-Type, Fully\-Qualified\-Name)}\label{persist_8h_518a5354fd7cb859b9534d7806cc883c}


{\bf Value:}

\footnotesize\begin{verbatim}NS_PREFIX BaseObject *createNew##ClassType() { return new ClassType; }                \
  const char* ClassType::getPersistenceID() const {return FullyQualifiedName;} \
  NS_PREFIX Engine& operator>>(NS_PREFIX Engine& ar, ClassType &ob)                           \
    { ar >> (NS_PREFIX BaseObject &) ob; return ar; }                                 \
  NS_PREFIX Engine& operator>>(NS_PREFIX Engine& ar, ClassType *&ob)                          \
    { ar >> (NS_PREFIX BaseObject *&) ob; return ar; }                                \
  NS_PREFIX Engine& operator<<(NS_PREFIX Engine& ar, ClassType const &ob)                             \
    { ar << (NS_PREFIX BaseObject const *)&ob; return ar; }                           \
  NS_PREFIX TypeManager::Registration                                                 \
        ClassType::registrationFor##ClassType(FullyQualifiedName,             \
                                              createNew##ClassType);
\end{verbatim}\normalsize 
\index{persist.h@{persist.h}!NO_COMPRESSION@{NO\_\-COMPRESSION}}
\index{NO_COMPRESSION@{NO\_\-COMPRESSION}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define NO\_\-COMPRESSION}\label{persist_8h_dd94524a0409d3308ec901d8917f88b3}


\index{persist.h@{persist.h}!NS_PREFIX@{NS\_\-PREFIX}}
\index{NS_PREFIX@{NS\_\-PREFIX}!persist.h@{persist.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define NS\_\-PREFIX~ost::}\label{persist_8h_007a79d2deffc2a4a09bcce1943a6ecb}