GNU CommonC++
Classes | Namespaces | Macros | Typedefs
persist.h File Reference

Persistence library classes. More...

#include <cc++/config.h>
#include <cc++/exception.h>
#include <cc++/missing.h>
#include <cc++/string.h>
#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <map>

Go to the source code of this file.

Classes

class  ost::TypeManager
 This class manages the types for generation of the persistent objects. More...
 
class  ost::TypeManager::Registration
 This manages a registration to the typemanager - attempting to remove problems with the optimisers. More...
 
class  ost::BaseObject
 BaseObject. More...
 
class  ost::Engine
 Engine. More...
 

Namespaces

 ost
 

Macros

#define NO_COMPRESSION
 
#define NS_PREFIX   ost::
 
#define DECLARE_PERSISTENCE(ClassType)
 
#define IMPLEMENT_PERSISTENCE(ClassType, FullyQualifiedName)
 
#define CCXX_ENGINEWRITE_REF(valref)   writeBinary((const uint8*)&valref,sizeof(valref))
 
#define CCXX_ENGINEREAD_REF(valref)   readBinary((uint8*)&valref,sizeof(valref))
 

Typedefs

typedef class BaseObject *(* ost::NewBaseObjectFunction )(void)
 

Detailed Description

Persistence library classes.

Macro Definition Documentation

#define CCXX_ENGINEREAD_REF (   valref)    readBinary((uint8*)&valref,sizeof(valref))

Referenced by ost::Engine::read().

#define CCXX_ENGINEWRITE_REF (   valref)    writeBinary((const uint8*)&valref,sizeof(valref))

Referenced by ost::Engine::write().

#define DECLARE_PERSISTENCE (   ClassType)
Value:
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;
__EXPORT Engine & operator>>(Engine &ar, BaseObject &ob) THROWS(PersistException)
#define NS_PREFIX
Definition: persist.h:79
__EXPORT Engine & operator<<(Engine &ar, BaseObject const &ob) THROWS(PersistException)
#define IMPLEMENT_PERSISTENCE (   ClassType,
  FullyQualifiedName 
)
Value:
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);
__EXPORT Engine & operator>>(Engine &ar, BaseObject &ob) THROWS(PersistException)
#define NS_PREFIX
Definition: persist.h:79
__EXPORT Engine & operator<<(Engine &ar, BaseObject const &ob) THROWS(PersistException)
#define NO_COMPRESSION
#define NS_PREFIX   ost::