0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[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
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class TransferWriter from XSControl inherits TShared
18
19 ---Purpose : TransferWriter gives help to control transfer to write a file
20 -- after having converted data from Cascade/Imagine
21 --
22 -- It works with a Controller (which itself can work with an
23 -- Actor to Write) and a FinderProcess. It records results and
24 -- checks
25
26uses Transient,
27 Shape from TopoDS,
28 CheckIterator from Interface,
29 InterfaceModel from Interface,
30 FinderProcess, Controller, ReturnStatus
31
32is
33
6e33d3ce 34 Create returns TransferWriter;
7fd59977 35 ---Purpose : Creates a TransferWriter, empty, ready to run
36 -- with an empty FinderProcess (but no controller, etc)
37
6e33d3ce 38 FinderProcess (me) returns FinderProcess;
7fd59977 39 ---Purpose : Returns the FinderProcess itself
40
6e33d3ce 41 SetFinderProcess (me : mutable; FP : FinderProcess);
7fd59977 42 ---Purpose : Sets a new FinderProcess and forgets the former one
43
44 Controller (me) returns Controller;
45 ---Purpose : Returns the currently used Controller
46
47 SetController (me : mutable; ctl : Controller);
48 ---Purpose : Sets a new Controller, also sets a new FinderProcess
49
50 Clear (me : mutable; mode : Integer);
51 ---Purpose : Clears recorded data according a mode
52 -- 0 clears FinderProcess (results, checks)
53 -- -1 create a new FinderProcess
54
55 TransferMode (me) returns Integer;
56 ---Purpose : Returns the current Transfer Mode (an Integer)
57 -- It will be interpreted by the Controller to run Transfers
58 -- This call form could be later replaced by more specific ones
59 -- (parameters suited for each norm / transfer case)
60
61 SetTransferMode (me : mutable; mode : Integer);
62 ---Purpose : Changes the Transfer Mode
63
64 PrintStats (me; what : Integer; mode : Integer = 0);
65 ---Purpose : Prints statistics on current Trace File, according what,mode
66 -- See PrintStatsProcess for details
67
68 -- Operations themselves
69
70 RecognizeTransient (me : mutable; obj : Transient) returns Boolean;
71 ---Purpose : Tells if a transient object (from an application) is a valid
72 -- candidate for a transfer to a model
73 -- Asks the Controller (RecognizeWriteTransient)
74 -- If <obj> is a HShape, calls RecognizeShape
75
6e33d3ce 76 TransferWriteTransient (me : mutable; model : InterfaceModel;
7fd59977 77 obj : Transient)
78 returns ReturnStatus;
79 ---Purpose : Transfers a Transient object (from an application) to a model
80 -- of current norm, according to the last call to SetTransferMode
81 -- Works by calling the Controller
82 -- Returns status : =0 if OK, >0 if error during transfer, <0 if
83 -- transfer badly initialised
84
85 RecognizeShape (me : mutable; shape : Shape from TopoDS) returns Boolean;
86 ---Purpose : Tells if a Shape is valid for a transfer to a model
87 -- Asks the Controller (RecognizeWriteShape)
88
6e33d3ce 89 TransferWriteShape (me : mutable; model : InterfaceModel;
7fd59977 90 shape : Shape from TopoDS)
91 returns ReturnStatus;
92 ---Purpose : Transfers a Shape from CasCade to a model of current norm,
93 -- according to the last call to SetTransferMode
94 -- Works by calling the Controller
95 -- Returns status : =0 if OK, >0 if error during transfer, <0 if
96 -- transfer badly initialised
97
98 CheckList (me) returns CheckIterator;
99 ---Purpose : Returns the check-list of last transfer (write), i.e. the
100 -- check-list currently recorded in the FinderProcess
101
102 ResultCheckList (me; model : InterfaceModel) returns CheckIterator;
103 ---Purpose : Returns the check-list of last transfer (write), but tries
104 -- to bind to each check, the resulting entity in the model
105 -- instead of keeping the original Mapper, whenever known
106
107 PrintStatsProcess (myclass; TP : FinderProcess;
108 what : Integer; mode : Integer = 0);
109 ---Purpose : Forecast to print statitics about a FinderProcess
110
111fields
112
113 theController : Controller;
114 theTransferWrite : FinderProcess;
115 theTransferMode : Integer;
116
117end TransferWriter;