Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

persist.h File Reference

#include <cc++/config.h>
#include <cc++/persist.h>
#include <iostream>
#include <string>
#include <vector>
#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::Registration
 This manages a registration to the typemanager - attempting to remove problems with the optimisers. More...

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


Defines

#define NO_COMPRESSION
#define DECLARE_PERSISTENCE(ClassType)
#define IMPLEMENT_PERSISTENCE(ClassType, FullyQualifiedName)
#define _ENGINEWRITE_REF(valref)   WriteBinary((const uint8*)&valref,sizeof(valref))
#define _ENGINEREAD_REF(valref)   ReadBinary((uint8*)&valref,sizeof(valref))

Typedefs

typedef BaseObject *(* NewBaseObjectFunction )(void)

Functions

 CCXX_EXPORT (Engine &) operator>>(Engine &ar, BaseObject *&ob) THROWS(Engine
 serialize a vector of some serializable content to the engine. More...

template<class T> Engineoperator>> (Engine &ar, std::vector< T > &ob) THROWS(Engine
 deserialize a vector of deserializable content from an engine. More...

template<class Key, class Value> Engineoperator<< (Engine &ar, std::map< Key, Value > const &ob) THROWS(Engine
 serialize a map with keys/values which both are serializeable to an engine. More...

template<class Key, class Value> Engineoperator>> (Engine &ar, std::map< Key, Value > &ob) THROWS(Engine
 deserialize a map with keys/values which both are serializeable from an engine. More...


Define Documentation

#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 const *ob)                         \
    { ar << (BaseObject const *)ob; return ar; }                              \
  TypeManager::Registration                                                   \
        ClassType::RegistrationFor##ClassType(FullyQualifiedName,             \
                                              CreateNew##ClassType);

#define NO_COMPRESSION
 

#define _ENGINEREAD_REF valref      ReadBinary((uint8*)&valref,sizeof(valref))
 

#define _ENGINEWRITE_REF valref      WriteBinary((const uint8*)&valref,sizeof(valref))
 


Typedef Documentation

typedef class BaseObject* (* NewBaseObjectFunction)(void)
 


Function Documentation

CCXX_EXPORT Engine &  
 

serialize a vector of some serializable content to the engine.

template<class Key, class Value>
Engine& operator<< Engine &   ar,
std::map< Key, Value > const &   ob
 

serialize a map with keys/values which both are serializeable to an engine.

template<class Key, class Value>
Engine& operator>> Engine &   ar,
std::map< Key, Value > &   ob
 

deserialize a map with keys/values which both are serializeable from an engine.

template<class T>
Engine& operator>> Engine &   ar,
std::vector< T > &   ob
 

deserialize a vector of deserializable content from an engine.


Generated at Tue Nov 20 12:34:33 2001 for CommonC++ by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001