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
|
-- File: BinLDrivers_DocumentRetrievalDriver.cdl
-- Created: Thu Oct 31 10:52:35 2002
-- Author: Michael SAZONOV
-- <msv@novgorox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2002
class DocumentRetrievalDriver from BinLDrivers inherits RetrievalDriver from PCDM
uses
HeaderData from Storage,
Position from Storage,
AsciiString from TCollection,
ExtendedString from TCollection,
Document from PCDM,
Document from CDM,
Application from CDM,
MessageDriver from CDM,
ADriverTable from BinMDF,
RRelocationTable from BinObjMgt,
Persistent from BinObjMgt,
Label from TDF,
IStream from Standard,
MapOfInteger from TColStd,
DocumentSection from BinLDrivers,
VectorOfDocumentSection from BinLDrivers
is
-- ===== Public methods =====
Create returns mutable DocumentRetrievalDriver from BinLDrivers;
---Purpose: Constructor
SchemaName (me)
returns ExtendedString from TCollection is redefined virtual;
---Purpose: pure virtual method definition
Make (me : mutable; PD : Document from PCDM;
TD : Document from CDM)
is redefined virtual;
---Purpose: pure virtual method definition
CreateDocument (me : mutable)
returns Document from CDM is redefined virtual;
---Purpose: pure virtual method definition
Read(me:mutable; theFileName: ExtendedString from TCollection;
theNewDocument: Document from CDM;
theApplication: Application from CDM) is redefined virtual;
---Purpose: retrieves the content of the file into a new Document.
AttributeDrivers (me : mutable; theMsgDriver: MessageDriver from CDM)
returns ADriverTable from BinMDF
is virtual;
-- ===== Protected methods =====
ReadSubTree (me: mutable; theIS : in out IStream from Standard;
theData : Label from TDF)
returns Integer from Standard
is virtual protected;
---Purpose: Read the tree from the stream <theIS> to <theLabel>
ReadInfoSection(me: mutable; theFile : AsciiString from TCollection;
theData : in out HeaderData from Storage)
returns Position from Storage is protected;
---Purpose: Read the info section of theFile into theData,
-- return a file position corresponding to the info
-- section end
ReadSection (me: mutable;
theSection : in out DocumentSection from BinLDrivers;
theDoc : Document from CDM;
theIS : in out IStream from Standard)
is virtual protected;
---Purpose: define the procedure of reading a section to file.
ReadShapeSection (me: mutable;
theSection : in out DocumentSection from BinLDrivers;
theIS : in out IStream from Standard;
isMess : Boolean from Standard = Standard_False)
is virtual protected;
CheckShapeSection (me: mutable;
thePos : Position from Storage;
theIS : in out IStream from Standard)
is virtual protected;
PropagateDocumentVersion(me: mutable; theVersion : Integer from Standard)
is virtual protected;
WriteMessage(me: mutable; theMessage : ExtendedString from TCollection)
is protected;
---Purpose: write theMessage to the MessageDriver of the
-- Application
fields
-- use one self-increasing buffer for an attribute
myPAtt : Persistent from BinObjMgt;
myDrivers : ADriverTable from BinMDF is protected;
myRelocTable: RRelocationTable from BinObjMgt is protected;
myMsgDriver : MessageDriver from CDM;
-- map of type ID of attributes registered in file header but not having a driver
myMapUnsupported : MapOfInteger from TColStd;
mySections : VectorOfDocumentSection from BinLDrivers;
end DocumentRetrievalDriver;
|