0022898: IGES import fails in german environment
[occt.git] / src / FSD / FSD_CmpFile.cdl
1 -- Created on: 1996-11-29
2 -- Created by: Christophe LEYNADIER
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class CmpFile from FSD
23
24 inherits BaseDriver from Storage
25
26 uses Position    from Storage,
27      Error       from Storage,
28      OpenMode    from Storage,
29      AsciiString from TCollection,
30      SequenceOfAsciiString from TColStd,
31      SequenceOfExtendedString from TColStd,
32      ExtendedString from TCollection,
33      FStream     from FSD
34      
35 raises StreamTypeMismatchError from Storage,
36        StreamFormatError from Storage,
37        StreamWriteError from Storage,
38        StreamExtCharParityError from Storage
39
40 is
41     Create returns CmpFile from FSD;
42     
43     Open(me : in out; aName : AsciiString from TCollection; aMode : OpenMode from Storage) returns Error from Storage;
44         
45     IsEnd(me : in out) returns Boolean from Standard;
46
47     Tell( me : in out ) returns Position from Storage;
48         ---Purpose: return position in the file. Return -1 upon error.
49
50     IsGoodFileType(myclass; aName : AsciiString from TCollection)
51         returns Error from Storage;
52     
53     --  INFO SECTION
54     --  write
55     --  
56     BeginWriteInfoSection(me : in out) returns Error from Storage;    
57     
58     WriteInfo(me : in out; nbObj : Integer from Standard; 
59                            dbVersion : AsciiString from TCollection;
60                            date : AsciiString from TCollection;
61                            schemaName : AsciiString from TCollection;
62                            schemaVersion : AsciiString from TCollection;
63                            appName : ExtendedString from TCollection;
64                            appVersion : AsciiString from TCollection;
65                            objectType : ExtendedString from TCollection;
66                            userInfo : SequenceOfAsciiString from TColStd)
67     raises StreamWriteError;
68                            
69     EndWriteInfoSection(me : in out) returns Error from Storage;
70     
71     -- read
72     -- 
73     BeginReadInfoSection(me : in out) returns Error from Storage;
74     
75     ReadInfo(me : in out; nbObj : in out Integer from Standard; 
76                           dbVersion : in out AsciiString from TCollection;
77                           date : in out AsciiString from TCollection;
78                           schemaName : in out AsciiString from TCollection;
79                           schemaVersion : in out AsciiString from TCollection;
80                           appName  : in out ExtendedString from TCollection;
81                           appVersion : in out AsciiString from TCollection;
82                           objectType : in out ExtendedString from TCollection;
83                           userInfo : in out SequenceOfAsciiString from TColStd)
84     raises StreamTypeMismatchError,StreamExtCharParityError;
85     
86     EndReadInfoSection(me : in out) returns Error from Storage;
87
88     --  COMMENTS SECTION
89     --  write
90     --  
91     BeginWriteCommentSection(me : in out) returns Error from Storage;    
92     
93     WriteComment(me : in out; userComments : SequenceOfExtendedString from TColStd)
94     raises StreamWriteError;
95                            
96     EndWriteCommentSection(me : in out) returns Error from Storage;
97     
98     -- read
99     -- 
100     BeginReadCommentSection(me : in out) returns Error from Storage;
101
102     ReadComment(me : in out;  userComments : in out SequenceOfExtendedString from TColStd)
103     raises StreamTypeMismatchError,StreamExtCharParityError;
104     
105     EndReadCommentSection(me : in out) returns Error from Storage;
106
107
108     -- TYPE SECTION
109     -- 
110     BeginWriteTypeSection(me : in out) returns Error from Storage;    
111     
112     SetTypeSectionSize(me : in out; aSize : Integer from Standard)
113     raises StreamWriteError;
114     
115     WriteTypeInformations(me : in out; typeNum : Integer from Standard; typeName : AsciiString from TCollection)
116     raises StreamWriteError;
117     
118     EndWriteTypeSection(me : in out) returns Error from Storage;
119          
120     -- read
121     BeginReadTypeSection(me : in out) returns Error from Storage;
122     
123     TypeSectionSize(me : in out) returns Integer from Standard
124     raises StreamTypeMismatchError;
125     
126     ReadTypeInformations(me : in out; typeNum : in out Integer from Standard; typeName : in out AsciiString from TCollection)
127     raises StreamTypeMismatchError;
128     
129     EndReadTypeSection(me : in out) returns Error from Storage;
130     
131     -- ROOT SECTION
132     -- write
133     -- 
134     BeginWriteRootSection(me : in out) returns Error from Storage;    
135     
136     SetRootSectionSize(me : in out; aSize : Integer from Standard)
137     raises StreamWriteError;
138     
139     WriteRoot(me : in out; rootName : AsciiString from TCollection; aRef : Integer from Standard; aType : AsciiString from TCollection)
140     raises StreamWriteError;
141     
142     EndWriteRootSection(me : in out) returns Error from Storage;
143
144     -- read
145     -- 
146     BeginReadRootSection(me : in out) returns Error from Storage;
147     
148     RootSectionSize(me : in out) returns Integer from Standard
149     raises StreamTypeMismatchError;
150     
151     ReadRoot(me : in out; rootName : in out AsciiString from TCollection; aRef : in out Integer from Standard; aType : in out AsciiString from TCollection)
152     raises StreamTypeMismatchError;
153     
154     EndReadRootSection(me : in out) returns Error from Storage;
155     
156     -- REF SECTION
157     -- write
158     -- 
159     BeginWriteRefSection(me : in out) returns Error from Storage;
160     
161     SetRefSectionSize(me : in out; aSize : Integer from Standard)
162     raises StreamWriteError;
163     
164     WriteReferenceType(me : in out; reference : Integer from Standard; typeNum : Integer from Standard)
165     raises StreamWriteError;
166     
167     EndWriteRefSection(me : in out) returns Error from Storage;
168
169     -- read
170     -- 
171     BeginReadRefSection(me : in out) returns Error from Storage;
172     
173     RefSectionSize(me : in out) returns Integer from Standard
174     raises StreamTypeMismatchError;
175     
176     ReadReferenceType(me : in out; reference : in out Integer from Standard; typeNum : in out Integer from Standard)
177     raises StreamTypeMismatchError;
178     
179     EndReadRefSection(me : in out) returns Error from Storage;
180     
181     -- DATA SECTION
182     -- write
183     -- 
184     BeginWriteDataSection(me : in out) returns Error from Storage;    
185     
186     WritePersistentObjectHeader(me : in out; aRef : Integer from Standard; aType : Integer from Standard)
187     raises StreamWriteError;
188     
189     BeginWritePersistentObjectData(me : in out)
190     raises StreamWriteError;
191     
192     BeginWriteObjectData(me : in out)
193     raises StreamWriteError;
194     
195     EndWriteObjectData(me : in out)
196     raises StreamWriteError;
197     
198     EndWritePersistentObjectData(me : in out)
199     raises StreamWriteError;
200     
201     EndWriteDataSection(me : in out) returns Error from Storage;
202     
203     -- read
204     -- 
205     BeginReadDataSection(me : in out) returns Error from Storage;
206     
207     ReadPersistentObjectHeader(me : in out; aRef : in out Integer from Standard; aType : in out Integer from Standard)
208     raises StreamTypeMismatchError,StreamFormatError;
209     
210     BeginReadPersistentObjectData(me : in out)
211     raises StreamFormatError;
212     
213     BeginReadObjectData(me : in out)
214     raises StreamFormatError;
215     
216     EndReadObjectData(me : in out)
217     raises StreamFormatError;
218     
219     EndReadPersistentObjectData(me : in out)
220     raises StreamFormatError;
221     
222     EndReadDataSection(me : in out) returns Error from Storage;
223   
224     -- 
225     SkipObject(me : in out);
226     -- 
227      
228     PutReference(me : in out; aValue : Integer from Standard) returns like me
229     raises StreamWriteError;
230     ---C++: return &
231
232     PutCharacter(me : in out; aValue : Character from Standard) returns like me
233     raises StreamWriteError;
234     ---C++: alias operator <<
235     ---C++: return &
236
237     PutExtCharacter(me : in out; aValue : ExtCharacter from Standard) returns like me
238     raises StreamWriteError;
239     ---C++: alias operator <<
240     ---C++: return &
241
242     PutInteger(me : in out; aValue : Integer from Standard) returns like me
243     raises StreamWriteError;
244     ---C++: alias operator <<
245     ---C++: return &
246     
247     PutBoolean(me : in out; aValue : Boolean from Standard) returns like me
248     raises StreamWriteError;
249     ---C++: alias operator <<
250     ---C++: return &
251     
252     PutReal(me : in out; aValue : Real from Standard) returns like me
253     raises StreamWriteError;
254     ---C++: alias operator <<
255     ---C++: return &
256     
257     PutShortReal(me : in out; aValue : ShortReal from Standard) returns like me
258     raises StreamWriteError;
259     ---C++: alias operator <<
260     ---C++: return &
261
262     GetReference(me : in out; aValue : in out Integer from Standard) returns like me
263         raises StreamTypeMismatchError;
264     ---C++: return &
265
266     GetCharacter(me : in out; aValue : in out Character from Standard) returns like me
267         raises StreamTypeMismatchError;
268     ---C++: alias operator >>
269     ---C++: return &
270
271     GetExtCharacter(me : in out; aValue : in out ExtCharacter from Standard) returns like me
272         raises StreamTypeMismatchError;
273     ---C++: alias operator >>
274     ---C++: return &
275
276     GetInteger(me : in out; aValue : in out Integer from Standard) returns like me
277         raises StreamTypeMismatchError;
278     ---C++: alias operator >>
279     ---C++: return &
280     
281     GetBoolean(me : in out; aValue : in out Boolean from Standard) returns like me
282         raises StreamTypeMismatchError;
283     ---C++: alias operator >>
284     ---C++: return &
285     
286     GetReal(me : in out; aValue :in out  Real from Standard) returns like me
287         raises StreamTypeMismatchError;
288     ---C++: alias operator >>
289     ---C++: return &
290     
291     GetShortReal(me : in out; aValue : in out ShortReal from Standard) returns like me
292         raises StreamTypeMismatchError;
293     ---C++: alias operator >>
294     ---C++: return &
295
296     Close(me : in out) returns Error from Storage;
297     
298     Destroy(me : in out);
299     ---C++: alias ~
300
301     ReadLine(me : in out; buffer : in out AsciiString from TCollection) is protected;
302     ---Purpose: read from the current position to the end of line.
303     
304     ReadWord(me : in out; buffer : in out AsciiString from TCollection) is protected;
305     ---Purpose: read from the current position to the next white space or end of line.   
306
307     ReadExtendedLine(me : in out; buffer : in out ExtendedString from TCollection) 
308     raises StreamExtCharParityError 
309     is protected;
310     ---Purpose: read extended chars (unicode) from the current position to the end of line.
311
312     WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
313     ---Purpose: write from the current position to the end of line.
314
315     ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
316     ---Purpose: read <rsize> character from the current position.
317
318     ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
319     ---Purpose: read from the first none space character position to the end of line.
320     
321     FlushEndOfLine(me : in out) is protected;
322     
323     FindTag(me : in out; aTag : CString from Standard) returns Error from Storage is protected; 
324
325     MagicNumber(myclass)
326         returns CString from Standard is private;
327     ---C++: return const
328     
329     RaiseError(me: in out ; theFailure: Type from Standard) is private;
330         
331 fields
332     
333     myStream    : FStream from FSD;
334 end;