ucommon
Data Structures | Namespaces | Macros | Typedefs
persist.h File Reference

The GNU Common C++ persistance engine by Daniel Silverstone. More...

#include <ucommon/platform.h>
#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <map>
Include dependency graph for persist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  ucommon::PersistEngine
 Stream serialization of persistent classes. More...
 
class  ucommon::PersistObject
 PersistObject. More...
 
class  ucommon::TypeManager
 Type manager for persistence engine. More...
 
class  ucommon::TypeManager::registration
 This manages a registration to the typemanager - attempting to remove problems with the optimizers. More...
 

Namespaces

 ucommon
 Common namespace for all ucommon objects.
 

Macros

#define CCXX_ENGINEREAD_REF(valref)   readBinary((uint8_t*)&valref,sizeof(valref))
 
#define CCXX_ENGINEWRITE_REF(valref)   writeBinary((const uint8_t*)&valref,sizeof(valref))
 
#define CCXX_RE(ar, ob)   ar.read(ob); return ar
 
#define CCXX_WE(ar, ob)   ar.write(ob); return ar
 
#define DECLARE_PERSISTENCE(ClassType)
 
#define IMPLEMENT_PERSISTENCE(ClassType, FullyQualifiedName)
 

Typedefs

typedef class PersistObject *(* ucommon::NewPersistObjectFunction )(void)
 

Detailed Description

The GNU Common C++ persistance engine by Daniel Silverstone.

Definition in file persist.h.

Macro Definition Documentation

#define DECLARE_PERSISTENCE (   ClassType)
Value:
public: \
friend ucommon::PersistEngine& operator>>( ucommon::PersistEngine& ar, ClassType *&ob); \
friend ucommon::PersistEngine& operator<<( ucommon::PersistEngine& ar, ClassType const &ob); \
friend ucommon::PersistObject *createNew##ClassType(); \
virtual const char* getPersistenceID() const; \
static ucommon::TypeManager::Registration registrationFor##ClassType;
PersistEngine & operator>>(PersistEngine &ar, PersistObject &ob)
Definition: persist.h:314
Stream serialization of persistent classes.
Definition: persist.h:189
PersistEngine & operator<<(PersistEngine &ar, PersistObject const &ob)
Definition: persist.h:318
PersistObject.
Definition: persist.h:146

Definition at line 104 of file persist.h.

#define IMPLEMENT_PERSISTENCE (   ClassType,
  FullyQualifiedName 
)
Value:
ucommon::PersistObject *createNew##ClassType() { return new ClassType; } \
const char* ClassType::getPersistenceID() const {return FullyQualifiedName;} \
ucommon::PersistEngine& operator>>(ucommon::PersistEngine& ar, ClassType &ob) \
{ ar >> (ucommon::PersistObject &) ob; return ar; } \
ucommon::PersistEngine& operator>>(ucommon::PersistEngine& ar, ClassType *&ob) \
{ ar >> (ucommon::PersistObject *&) ob; return ar; } \
ucommon::PersistEngine& operator<<(ucommon::PersistEngine& ar, ClassType const &ob) \
{ ar << (ucommon::PersistObject const *)&ob; return ar; } \
ucommon::TypeManager::Registration \
ClassType::registrationFor##ClassType(FullyQualifiedName, \
createNew##ClassType);
PersistEngine & operator>>(PersistEngine &ar, PersistObject &ob)
Definition: persist.h:314
Stream serialization of persistent classes.
Definition: persist.h:189
PersistEngine & operator<<(PersistEngine &ar, PersistObject const &ob)
Definition: persist.h:318
PersistObject.
Definition: persist.h:146

Definition at line 112 of file persist.h.