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

persist.h File Reference

Persistence library classes. More...

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

Go to the source code of this file.

Compounds

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

class  Engine
 Engine stream serialization of persistent classes. More...

class  Engine.Exception
 If problems happen which are fatal - expect one of these thrown at you. More...

class  PersistException
class  TypeManager
 This class manages the types for generation of the persistent objects. Type manager for persistence engine. More...

class  TypeManager.Registration
 This manages a registration to the typemanager - attempting to remove problems with the optimisers. More...


Defines

#define NO_COMPRESSION
#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 BaseObject *(* NewBaseObjectFunction )(void)

Functions

BaseObject &ob THROWS (Engine::Exception)


Detailed Description

Persistence library classes.


Define Documentation

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

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

#define DECLARE_PERSISTENCE ClassType   ) 
 

Value:

public:                                                         \
    friend Engine& operator>>(Engine& ar, ClassType *&ob);              \
    friend Engine& operator<<(Engine& ar, ClassType const &ob); \
    friend BaseObject *createNew##ClassType();                          \
    virtual const char* getPersistenceID() const;                       \
    static TypeManager::Registration registrationFor##ClassType;

#define IMPLEMENT_PERSISTENCE ClassType,
FullyQualifiedName   ) 
 

Value:

BaseObject *createNew##ClassType() { return new ClassType; }                  \
  const char* ClassType::getPersistenceID() const {return FullyQualifiedName;} \
  Engine& operator>>(Engine& ar, ClassType &ob)                       \
    { ar >> (BaseObject &) ob; return ar; }                                   \
  Engine& operator>>(Engine& ar, ClassType *&ob)                              \
    { ar >> (BaseObject *&) ob; return ar; }                                  \
  Engine& operator<<(Engine& ar, ClassType const &ob)                         \
    { ar << (BaseObject const *)&ob; return ar; }                             \
  TypeManager::Registration                                                   \
        ClassType::registrationFor##ClassType(FullyQualifiedName,             \
                                              createNew##ClassType);

#define NO_COMPRESSION
 


Typedef Documentation

typedef class BaseObject*(* NewBaseObjectFunction)(void)
 


Function Documentation

bool ob THROWS Engine::Exception   ) 
 


Generated on Thu Sep 25 13:14:32 2003 for GNU CommonC++ by doxygen 1.3.3