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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
-- File: MDF.cdl
-- ---------
-- Author: DAUTRY Philippe
-- <fid@fox.paris1.matra-dtv.fr>
---Copyright: MATRA DATAVISION 1997
---Version: 0.0
---History: Version Date Purpose
-- 0.0 Mar 13 1997 Creation
package MDF
---Purpose: This package provides classes and methods to
-- translate a transient DF into a persistent one and
-- vice versa.
--
-- Driver
--
-- A driver is a tool used to translate a transient
-- attribute into a persistent one and vice versa.
--
-- Relocation Table
--
-- A relocation table is a tool who provides services
-- to relocate transient objects into persistent ones
-- (or vice versa). It uses a map system to keep the
-- sharing. This service is used by the drivers.
--
-- Driver Table
--
-- A driver table is an object building links between
-- object types and object drivers. In the
-- translation process, a driver table is asked to
-- give a translation driver for each current object
-- to be translated.
uses
Standard,
MMgt,
TCollection,
TColStd,
PColStd,
PTColStd,
TDF,
CDM,
PDF
is
---Category: Classes
-- =============================================================
deferred class ASDriver; -- Attribute Storage Driver.
deferred class ARDriver; -- Attribute Retrieval Driver.
generic class RelocationTable; -- Relocation Table.
generic class DriverTable,
DriverList,
TypeDriverListMap; -- Driver Table.
class Tool from MDF;
---Purpose: Storage and Retrieval attributes drivers
-- ========================================
class TagSourceStorageDriver;
class TagSourceRetrievalDriver;
class ReferenceStorageDriver;
class ReferenceRetrievalDriver;
---Category: Instantiations
-- =============================================================
class ASDriverSequence instantiates Sequence from TCollection
(ASDriver from MDF);
class ASDriverHSequence instantiates HSequence from TCollection
(ASDriver from MDF,
ASDriverSequence from MDF);
class ARDriverSequence instantiates Sequence from TCollection
(ARDriver from MDF);
class ARDriverHSequence instantiates HSequence from TCollection
(ARDriver from MDF,
ARDriverSequence from MDF);
-- Storage Relocation Table (Transient->Persistent)
class SRelocationTable instantiates RelocationTable from MDF
(Attribute from TDF,
Attribute from PDF,
Transient from Standard,
Persistent from Standard,
TransientPersistentMap from PTColStd);
-- Retrieval Relocation Table (Persistent->Transient)
class RRelocationTable instantiates RelocationTable from MDF
(Attribute from PDF,
Attribute from TDF,
Persistent from Standard,
Transient from Standard,
PersistentTransientMap from PTColStd);
-- Map (Type, ASDriver)
class TypeASDriverMap instantiates DataMap from TCollection
(Type from Standard,
ASDriver from MDF,
MapTransientHasher from TColStd);
-- Map (Type, ARDriver)
class TypeARDriverMap instantiates DataMap from TCollection
(Type from Standard,
ARDriver from MDF,
MapTransientHasher from TColStd);
-- Attribute Storage Driver Table.
class ASDriverTable instantiates DriverTable from MDF
(ASDriver from MDF,
ASDriverHSequence from MDF,
TypeASDriverMap from MDF);
-- Attribute Retrieval Driver Table.
class ARDriverTable instantiates DriverTable from MDF
(ARDriver from MDF,
ARDriverHSequence from MDF,
TypeARDriverMap from MDF);
-- From Source To Target Object...
-- ===============================
FromTo(aSource : Data from TDF;
aTarget : in out Data from PDF;
aDriverTable : ASDriverTable from MDF;
aReloc : SRelocationTable from MDF;
aVersion : Integer from Standard = 0);
---Purpose: Translates a transient <aSource> into a persistent
-- <aTarget>.
FromTo(aSource : Data from PDF;
aTarget : in out Data from TDF;
aDriverTable : ARDriverTable from MDF;
aReloc : RRelocationTable from MDF);
---Purpose: Translates a persistent <aSource> into a transient
-- <aTarget>.
AddStorageDrivers(aDriverSeq : ASDriverHSequence from MDF; theMessageDriver : MessageDriver from CDM);
---Purpose: Adds the attribute storage drivers to <aDriverSeq>.
AddRetrievalDrivers(aDriverSeq : ARDriverHSequence from MDF; theMessageDriver : MessageDriver from CDM);
---Purpose: Adds the attribute retrieval drivers to <aDriverSeq>.
end MDF;
|