7fd59977 |
1 | -- File: XSControl_Writer.cdl |
2 | -- Created: Wed May 14 15:21:58 1997 |
3 | -- Author: Christian CAILLET |
4 | -- <cky@heliox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1997 |
6 | |
7 | |
8 | class Writer from XSControl |
9 | |
10 | ---Purpose : This class gives a simple way to create then write a |
11 | -- Model compliant to a given norm, from a Shape |
12 | -- The model can then be edited by tools by other appropriate tools |
13 | |
14 | uses CString, |
15 | InterfaceModel from Interface, WorkSession from XSControl, |
16 | ReturnStatus from IFSelect, |
17 | Shape from TopoDS |
18 | |
19 | is |
20 | |
21 | Create returns Writer; |
22 | ---Purpose : Creates a Writer from scratch |
23 | |
24 | Create (norm : CString) returns Writer; |
25 | ---Purpose : Creates a Writer from scratch, with a norm name which |
26 | -- identifie a Controller |
27 | |
28 | Create (WS : mutable WorkSession from XSControl; |
29 | scratch : Boolean = Standard_True) returns Writer; |
30 | ---Purpose : Creates a Writer from an already existing Session |
31 | -- If <scratch> is True (D), clears already recorded data |
32 | |
33 | SetNorm (me : in out; norm : CString) returns Boolean; |
34 | ---Purpose : Sets a specific norm to <me> |
35 | -- Returns True if done, False if <norm> is not available |
36 | |
37 | SetWS (me : in out; WS : mutable WorkSession from XSControl; |
38 | scratch : Boolean = Standard_True); |
39 | ---Purpose : Sets a specific session to <me> |
40 | |
41 | WS (me) returns WorkSession from XSControl; |
42 | ---Purpose : Returns the session used in <me> |
43 | |
44 | Model (me : in out; newone : Boolean = Standard_False) returns InterfaceModel; |
45 | ---Purpose : Returns the produced model. Produces a new one if not yet done |
46 | -- or if <newone> is True |
47 | -- This method allows for instance to edit product or header |
48 | -- data before writing |
49 | |
50 | TransferShape (me : in out; sh : Shape from TopoDS; mode : Integer = 0) |
51 | returns ReturnStatus; |
52 | ---Purpose : Transfers a Shape according to the mode |
53 | |
54 | WriteFile (me : in out; filename : CString) returns ReturnStatus; |
55 | ---Purpose : Writes the produced model |
56 | |
57 | PrintStatsTransfer (me; what : Integer; mode : Integer = 0); |
58 | ---Purpose : Prints Statistics about Transfer |
59 | |
60 | fields |
61 | |
62 | thesession : WorkSession from XSControl; |
63 | |
64 | end Writer; |