File: persist.h.3cc

package info (click to toggle)
libcommoncpp2 1.0.13-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,740 kB
  • ctags: 2,860
  • sloc: cpp: 18,857; sh: 8,451; ansic: 1,546; makefile: 299; xml: 5
file content (135 lines) | stat: -rw-r--r-- 3,838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.TH "persist.h" 3 "19 Jul 2003" "CommonC++" \" -*- nroff -*-
.ad l
.nh
.SH NAME
persist.h \- Persistence library classes. 
.SH SYNOPSIS
.br
.PP
\fC#include <cc++/config.h>\fP
.br
\fC#include <cc++/persist.h>\fP
.br
\fC#include <iostream>\fP
.br
\fC#include <string>\fP
.br
\fC#include <vector>\fP
.br
\fC#include <deque>\fP
.br
\fC#include <map>\fP
.br
.SS "Compounds"

.in +1c
.ti -1c
.RI "class \fBBaseObject\fP"
.br
.RI "\fIBaseObject Base class for classes that will be persistent.\fP"
.ti -1c
.RI "class \fBEngine\fP"
.br
.RI "\fIEngine stream serialization of persistent classes.\fP"
.ti -1c
.RI "class \fBException\fP"
.br
.RI "\fIIf problems happen which are fatal - expect one of these thrown at you.\fP"
.ti -1c
.RI "class \fBPersistException\fP"
.br
.ti -1c
.RI "class \fBRegistration\fP"
.br
.RI "\fIThis manages a registration to the typemanager - attempting to remove problems with the optimisers.\fP"
.ti -1c
.RI "class \fBTypeManager\fP"
.br
.RI "\fIThis class manages the types for generation of the persistent objects. Type manager for persistence engine.\fP"
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBNO_COMPRESSION\fP"
.br
.ti -1c
.RI "#define \fBDECLARE_PERSISTENCE\fP(ClassType)"
.br
.ti -1c
.RI "#define \fBIMPLEMENT_PERSISTENCE\fP(ClassType, FullyQualifiedName)"
.br
.ti -1c
.RI "#define \fBCCXX_ENGINEWRITE_REF\fP(valref)   writeBinary((const \fBuint8\fP*)&valref,sizeof(valref))"
.br
.ti -1c
.RI "#define \fBCCXX_ENGINEREAD_REF\fP(valref)   readBinary((\fBuint8\fP*)&valref,sizeof(valref))"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef \fBBaseObject\fP *(* \fBNewBaseObjectFunction\fP )(void)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBBaseObject\fP &ob \fBTHROWS\fP (\fBEngine::Exception\fP)"
.br
.in -1c
.SH "DETAILED DESCRIPTION"
.PP 
Persistence library classes.
.PP
.PP
.SH "DEFINE DOCUMENTATION"
.PP 
.SS "#define CCXX_ENGINEREAD_REF(valref)   readBinary((\fBuint8\fP*)&valref,sizeof(valref))"
.PP
.SS "#define CCXX_ENGINEWRITE_REF(valref)   writeBinary((const \fBuint8\fP*)&valref,sizeof(valref))"
.PP
.SS "#define DECLARE_PERSISTENCE(ClassType)"
.PP
\fBValue:\fP
.PP
.nf
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;
.fi
.SS "#define IMPLEMENT_PERSISTENCE(ClassType, FullyQualifiedName)"
.PP
\fBValue:\fP
.PP
.nf
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);
.fi
.SS "#define NO_COMPRESSION"
.PP
.SH "TYPEDEF DOCUMENTATION"
.PP 
.SS "typedef class \fBBaseObject\fP*(* NewBaseObjectFunction)(void)"
.PP
.SH "FUNCTION DOCUMENTATION"
.PP 
.SS "bool ob THROWS (\fBEngine::Exception\fP)"
.PP
.SH "AUTHOR"
.PP 
Generated automatically by Doxygen for CommonC++ from the source code.