Test for 0022778: Bug in BRepMesh
[occt.git] / src / XSControl / XSControl_TransferWriter.cdl
CommitLineData
b311480e 1-- Created on: 1996-03-13
2-- Created by: Christian CAILLET
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
7fd59977 21
22
23class TransferWriter from XSControl inherits TShared
24
25 ---Purpose : TransferWriter gives help to control transfer to write a file
26 -- after having converted data from Cascade/Imagine
27 --
28 -- It works with a Controller (which itself can work with an
29 -- Actor to Write) and a FinderProcess. It records results and
30 -- checks
31
32uses Transient,
33 Shape from TopoDS,
34 CheckIterator from Interface,
35 InterfaceModel from Interface,
36 FinderProcess, Controller, ReturnStatus
37
38is
39
40 Create returns mutable TransferWriter;
41 ---Purpose : Creates a TransferWriter, empty, ready to run
42 -- with an empty FinderProcess (but no controller, etc)
43
44 FinderProcess (me) returns mutable FinderProcess;
45 ---Purpose : Returns the FinderProcess itself
46
47 SetFinderProcess (me : mutable; FP : mutable FinderProcess);
48 ---Purpose : Sets a new FinderProcess and forgets the former one
49
50 Controller (me) returns Controller;
51 ---Purpose : Returns the currently used Controller
52
53 SetController (me : mutable; ctl : Controller);
54 ---Purpose : Sets a new Controller, also sets a new FinderProcess
55
56 Clear (me : mutable; mode : Integer);
57 ---Purpose : Clears recorded data according a mode
58 -- 0 clears FinderProcess (results, checks)
59 -- -1 create a new FinderProcess
60
61 TransferMode (me) returns Integer;
62 ---Purpose : Returns the current Transfer Mode (an Integer)
63 -- It will be interpreted by the Controller to run Transfers
64 -- This call form could be later replaced by more specific ones
65 -- (parameters suited for each norm / transfer case)
66
67 SetTransferMode (me : mutable; mode : Integer);
68 ---Purpose : Changes the Transfer Mode
69
70 PrintStats (me; what : Integer; mode : Integer = 0);
71 ---Purpose : Prints statistics on current Trace File, according what,mode
72 -- See PrintStatsProcess for details
73
74 -- Operations themselves
75
76 RecognizeTransient (me : mutable; obj : Transient) returns Boolean;
77 ---Purpose : Tells if a transient object (from an application) is a valid
78 -- candidate for a transfer to a model
79 -- Asks the Controller (RecognizeWriteTransient)
80 -- If <obj> is a HShape, calls RecognizeShape
81
82 TransferWriteTransient (me : mutable; model : mutable InterfaceModel;
83 obj : Transient)
84 returns ReturnStatus;
85 ---Purpose : Transfers a Transient object (from an application) to a model
86 -- of current norm, according to the last call to SetTransferMode
87 -- Works by calling the Controller
88 -- Returns status : =0 if OK, >0 if error during transfer, <0 if
89 -- transfer badly initialised
90
91 RecognizeShape (me : mutable; shape : Shape from TopoDS) returns Boolean;
92 ---Purpose : Tells if a Shape is valid for a transfer to a model
93 -- Asks the Controller (RecognizeWriteShape)
94
95 TransferWriteShape (me : mutable; model : mutable InterfaceModel;
96 shape : Shape from TopoDS)
97 returns ReturnStatus;
98 ---Purpose : Transfers a Shape from CasCade to a model of current norm,
99 -- according to the last call to SetTransferMode
100 -- Works by calling the Controller
101 -- Returns status : =0 if OK, >0 if error during transfer, <0 if
102 -- transfer badly initialised
103
104 CheckList (me) returns CheckIterator;
105 ---Purpose : Returns the check-list of last transfer (write), i.e. the
106 -- check-list currently recorded in the FinderProcess
107
108 ResultCheckList (me; model : InterfaceModel) returns CheckIterator;
109 ---Purpose : Returns the check-list of last transfer (write), but tries
110 -- to bind to each check, the resulting entity in the model
111 -- instead of keeping the original Mapper, whenever known
112
113 PrintStatsProcess (myclass; TP : FinderProcess;
114 what : Integer; mode : Integer = 0);
115 ---Purpose : Forecast to print statitics about a FinderProcess
116
117fields
118
119 theController : Controller;
120 theTransferWrite : FinderProcess;
121 theTransferMode : Integer;
122
123end TransferWriter;