UCommon
Data Structures | Namespaces | Constant Groups | 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.
 

Constant Groups

 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)
 
#define NS_PREFIX   ucc::
 

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 NS_PREFIX PersistEngine& operator>>( NS_PREFIX PersistEngine& ar, ClassType *&ob); \
friend NS_PREFIX PersistEngine& operator<<( NS_PREFIX PersistEngine& ar, ClassType const &ob); \
friend NS_PREFIX PersistObject *createNew##ClassType(); \
virtual const char* getPersistenceID() const; \
static NS_PREFIX TypeManager::Registration registrationFor##ClassType;

Definition at line 105 of file persist.h.

#define IMPLEMENT_PERSISTENCE (   ClassType,
  FullyQualifiedName 
)
Value:
NS_PREFIX PersistObject *createNew##ClassType() { return new ClassType; } \
const char* ClassType::getPersistenceID() const {return FullyQualifiedName;} \
NS_PREFIX PersistEngine& operator>>(NS_PREFIX PersistEngine& ar, ClassType &ob) \
{ ar >> (NS_PREFIX PersistObject &) ob; return ar; } \
NS_PREFIX PersistEngine& operator>>(NS_PREFIX PersistEngine& ar, ClassType *&ob) \
{ ar >> (NS_PREFIX PersistObject *&) ob; return ar; } \
NS_PREFIX PersistEngine& operator<<(NS_PREFIX PersistEngine& ar, ClassType const &ob) \
{ ar << (NS_PREFIX PersistObject const *)&ob; return ar; } \
NS_PREFIX TypeManager::Registration \
ClassType::registrationFor##ClassType(FullyQualifiedName, \
createNew##ClassType);

Definition at line 113 of file persist.h.