0022728: STEP export API does not provide possibility to control output stream
[occt.git] / src / IFSelect / IFSelect_WorkSession.cdl
CommitLineData
7fd59977 1-- File: WorkSession.cdl
2-- Created: Tue Dec 15 15:37:42 1992
3-- Author: Christian CAILLET
4-- <cky@topsn2>
5---Copyright: Matra Datavision 1992
6
7
8class WorkSession from IFSelect inherits TShared
9
10 ---Purpose : This class can be used to simply manage a process such as
11 -- splitting a file, extracting a set of Entities ...
12 -- It allows to manage different types of Variables : Integer or
13 -- Text Parameters, Selections, Dispatches, in addition to a
14 -- ShareOut. To each of these variables, a unique Integer
15 -- Identifier is attached. A Name can be attached too as desired.
16
17uses CString, AsciiString from TCollection, HAsciiString from TCollection,
18 Messenger from Message,
19 SequenceOfHAsciiString from TColStd, HSequenceOfHAsciiString from TColStd,
20 DictionaryOfInteger from Dico,
21 Type, SequenceOfTransient from TColStd, SequenceOfInteger from TColStd,
22 HSequenceOfInteger from TColStd, HArray1OfInteger from TColStd,
23 DictionaryOfTransient from Dico, IndexedDataMapOfTransientTransient,
24 Transient, HSequenceOfTransient from TColStd,
25 InterfaceModel from Interface, EntityIterator from Interface,
26 Protocol from Interface, HGraph from Interface, Graph from Interface,
27 CheckIterator from Interface, GTool from Interface,
28 ShareOut, IntParam, Signature, Selection, Dispatch, WorkLibrary,
29 ModelCopier, GeneralModifier, Modifier, Transformer,
30 SelectionIterator, PacketList, SignatureList, SignCounter,
31 ReturnStatus, RemainMode, PrintCount
32
33raises DomainError
34
35is
36
37 -- -- General Management -- --
38
39 Create returns mutable WorkSession;
40 ---Purpose : Creates a Work Session
41 -- It provides default, empty ShareOut and ModelCopier, which can
42 -- be replaced (if required, should be done just after creation).
43
44 SetErrorHandle (me : mutable; hand : Boolean);
45 ---Purpose : Changes the Error Handler status (by default, it is not set)
46
47 ErrorHandle (me) returns Boolean;
48 ---Purpose : Returns the Error Handler status
49
50 ShareOut (me) returns mutable ShareOut;
51 ---Purpose : Returns the ShareOut defined at creation time
52 ---C++ : return const &
53
54 SetShareOut (me : mutable; shareout : mutable ShareOut);
55 ---Purpose : Sets a new ShareOut. Fills Items which its content
56 -- Warning : data from the former ShareOut are lost
57
58
59 SetLibrary (me : mutable; lib : WorkLibrary);
60 ---Purpose : Sets a WorkLibrary, which will be used to Read and Write Files
61
62 WorkLibrary (me) returns WorkLibrary;
63 ---Purpose : Returns the WorkLibrary. Null Handle if not yet set
64 -- should be C++ : return const &
65
66 SetProtocol (me : mutable; protocol : Protocol from Interface);
67 ---Purpose : Sets a Protocol, which will be used to determine Graphs, to
68 -- Read and to Write Files
69
70 Protocol (me) returns Protocol;
71 ---Purpose : Returns the Protocol. Null Handle if not yet set
72 -- should be C++ : return const &
73
74 SetSignType (me : mutable; signtype : Signature);
75 ---Purpose : Sets a specific Signature to be the SignType, i.e. the
76 -- Signature which will determine TypeName from the Model
77 -- (basic function). It is recorded in the GTool
78 -- This Signature is also set as "xst-sign-type" (reserved name)
79 --
80
81 SignType (me) returns Signature;
82 ---Purpose : Returns the current SignType
83
84
85 HasModel (me) returns Boolean;
86 ---Purpose : Returns True is a Model has been set
87
88 SetModel (me : mutable; model : InterfaceModel;
89 clearpointed : Boolean = Standard_True);
90 ---Purpose : Sets a Model as input : this will be the Model from which the
91 -- ShareOut will work
92 -- if <clearpointed> is True (default) all SelectPointed items
93 -- are cleared, else they must be managed by the caller
94 -- Remark : SetModel clears the Graph, recomputes it if a
95 -- Protocol is set and if the Model is not empty, of course
96
97 Model (me) returns InterfaceModel;
98 ---Purpose : Returns the Model of the Work Session (Null Handle if none)
99 -- should be C++ : return const &
100
101 SetLoadedFile (me : mutable; filename : CString);
102 ---Purpose : Stores the filename used for read for setting the model
103 -- It is cleared by SetModel and ClearData(1)
104
105 LoadedFile (me) returns CString;
106 ---Purpose : Returns the filename used to load current model
107 -- empty if unknown
108
109 ReadFile (me : mutable; filename : CString) returns ReturnStatus;
110 ---Purpose : Reads a file with the WorkLibrary (sets Model and LoadedFile)
111 -- Returns a integer status which can be :
112 -- RetDone if OK, RetVoid if no Protocol not defined,
113 -- RetError for file not found, RetFail if fail during read
114
115 NbStartingEntities (me) returns Integer;
116 ---Purpose : Returns the count of Entities stored in the Model, or 0
117
118 StartingEntity (me; num : Integer) returns Transient;
119 ---Purpose : Returns an Entity stored in the Model of the WorkSession
120 -- (Null Handle is no Model or num out of range)
121
122 StartingNumber (me; ent : Transient) returns Integer;
123 ---Purpose : Returns the Number of an Entity in the Model
124 -- (0 if no Model set or <ent> not in the Model)
125
126 NumberFromLabel (me; val : CString; afternum : Integer= 0) returns Integer;
127 ---Purpose : From a given label in Model, returns the corresponding number
128 -- Starts from first entity by Default, may start after a given
129 -- number : this number may be given negative, its absolute value
130 -- is then considered. Hence a loop on NumberFromLabel may be
131 -- programmed (stop test is : returned value positive or null)
132 --
133 -- Returns 0 if not found, < 0 if more than one found (first
134 -- found in negative).
135 -- If <val> just gives an integer value, returns it
136
137 EntityLabel (me; ent : Transient) returns HAsciiString from TCollection;
138 ---Purpose : Returns the label for <ent>, as the Model does
139 -- If <ent> is not in the Model or if no Model is loaded, a Null
140 -- Handle is returned
141
142 EntityName (me; ent : Transient) returns HAsciiString from TCollection;
143 ---Purpose : Returns the Name of an Entity
144 -- This Name is computed by the general service Name
145 -- Returns a Null Handle if fails
146
147 CategoryNumber (me; ent : Transient) returns Integer;
148 ---Purpose : Returns the Category Number determined for an entity
149 -- it is computed by the class Category
150 -- An unknown entity (number 0) gives a value -1
151
152 CategoryName (me; ent : Transient) returns CString;
153 ---Purpose : Returns the Category Name determined for an entity
154 -- it is computed by the class Category
155 -- Remark : an unknown entity gives an empty string
156
157 ValidityName (me; ent : Transient) returns CString;
158 ---Purpose : Returns the Validity Name determined for an entity
159 -- it is computed by the class SignValidity
160 -- Remark : an unknown entity gives an empty string
161
162 ClearData (me : mutable; mode : Integer) is virtual;
163 ---Purpose : Clears recorded data (not the items) according mode :
164 -- 1 : all Data : Model, Graph, CheckList, + ClearData 4
165 -- 2 : Graph and CheckList (they will then be recomputed later)
166 -- 3 : CheckList (it will be recomputed by ComputeCheck)
167 -- 4 : just content of SelectPointed and Counters
168 -- Plus 0 : does nothing but called by SetModel
169 -- ClearData is virtual, hence it can be redefined to clear
170 -- other data of a specialised Work Session
171
172 ComputeGraph (me : mutable; enforce : Boolean = Standard_False) returns Boolean;
173 ---Purpose : Computes the Graph used for Selections, Displays ...
174 -- If a HGraph is already set, with same model as given by method
175 -- Model, does nothing. Else, computes a new Graph.
176 -- If <enforce> is given True, computes a new Graph anyway.
177 -- Remark that a call to ClearGraph will cause ComputeGraph to
178 -- really compute a new Graph
179 -- Returns True if Graph is OK, False else (i.e. if no Protocol
180 -- is set, or if Model is absent or empty).
181
182 HGraph (me : mutable) returns HGraph;
183 ---Purpose : Returns the Computed Graph as HGraph (Null Handle if not set)
184
185 Graph (me : mutable) returns Graph
186 ---Purpose : Returns the Computed Graph, for Read only
187 raises DomainError;
188 -- Error if the Graph is not available
189 ---C++ : return const &
190
191 Shareds (me : mutable; ent : Transient) returns HSequenceOfTransient;
192 ---Purpose : Returns the list of entities shared by <ent> (can be empty)
193 -- Returns a null Handle if <ent> is unknown
194
195 Sharings (me : mutable; ent : Transient) returns HSequenceOfTransient;
196 ---Purpose : Returns the list of entities sharing <ent> (can be empty)
197 -- Returns a null Handle if <ent> is unknown
198
199 IsLoaded (me) returns Boolean;
200 ---Purpose : Returns True if a Model is defined and really loaded (not
201 -- empty), a Protocol is set and a Graph has been computed.
202 -- In this case, the WorkSession can start to work
203
204 ComputeCheck (me : mutable; enforce : Boolean = Standard_False)
205 returns Boolean;
206 ---Purpose : Computes the CheckList for the Model currently loaded
207 -- It can then be used for displays, querries ...
208 -- Returns True if OK, False else (i.e. no Protocol set, or Model
209 -- absent). If <enforce> is False, works only if not already done
210 -- or if a new Model has been loaded from last call.
211 -- Remark : computation is enforced by every call to
212 -- SetModel or RunTransformer
213
214 ModelCheckList (me : mutable; complete : Boolean = Standard_True)
215 returns CheckIterator;
216 ---Purpose : Returns the Check List for the Model currently loaded :
217 -- <complete> = True : complete (syntactic & semantic messages),
218 -- computed if not yet done
219 -- <complete> = False : only syntactic (check file form)
220
221 CheckOne (me : mutable; ent : Transient; complete : Boolean = Standard_True)
222 returns CheckIterator;
223 ---Purpose : Returns a Check for a single entity, under the form of a
224 -- CheckIterator (this gives only one form for the user)
225 -- if <ent> is Null or equates the current Model, it gives the
226 -- Global Check, else the Check for the given entity
227 -- <complete> as for ModelCheckList
228
229 LastRunCheckList (me) returns CheckIterator;
230 ---Purpose : Returns the Check List produced by the last execution of
231 -- either : EvaluateFile(for Split), SendSplit, SendAll,
232 -- SendSelected, RunTransformer-RunModifier
233 -- Cleared by SetModel or ClearData(1)
234 -- The field is protected, hence a specialized WorkSession may
235 -- fill it
236
237 -- -- General Management on Items (and Names) -- --
238
239 MaxIdent (me) returns Integer;
240 ---Purpose : Returns the Maximum Value for an Item Identifier. It can be
241 -- greater to the count of known Items, because some can have
242 -- been removed
243
244 Item (me; id : Integer) returns mutable Transient;
245 ---Purpose : Returns an Item, given its Ident. Returns a Null Handle if
246 -- no Item corresponds to this Ident.
247
248 ItemIdent (me; item : Transient) returns Integer;
249 ---Purpose : Returns the Ident attached to an Item in the WorkSession, or
250 -- Zero if it is unknown
251
252 NamedItem (me; name : CString) returns mutable Transient;
253 ---Purpose : Returns the Item which corresponds to a Variable, given its
254 -- Name (whatever the type of this Item).
255 -- Returns a Null Handle if this Name is not recorded
256
257 NamedItem (me; name : HAsciiString from TCollection) returns mutable Transient;
258 ---Purpose : Same as above, but <name> is given through a Handle
259 -- Especially Usefull with methods SelectionNames, etc...
260
261 NameIdent (me; name : CString) returns Integer;
262 ---Purpose : Returns the Ident attached to a Name, 0 if name not recorded
263
264 HasName (me; item : Transient) returns Boolean;
265 ---Purpose : Returns True if an Item of the WorkSession has an attached Name
266
267 Name (me; item : Transient) returns HAsciiString from TCollection;
268 ---Purpose : Returns the Name attached to an Item as a Variable of this
269 -- WorkSession. If <item> is Null or not recorded, returns an
270 -- empty string.
271
272 AddItem (me : mutable; item : mutable Transient;
273 active : Boolean = Standard_True) returns Integer;
274 ---Purpose : Adds an Item and returns its attached Ident. Does nothing
275 -- if <item> is already recorded (and returns its attached Ident)
276 -- <active> if True commands call to SetActive (see below)
277 -- Remark : the determined Ident is used if <item> is a Dispatch,
278 -- to fill the ShareOut
279
280 AddNamedItem (me : mutable; name : CString; item : mutable Transient;
281 active : Boolean = Standard_True) returns Integer;
282 ---Purpose : Adds an Item with an attached Name. If the Name is already
283 -- known in the WorkSession, the older item losts it
284 -- Returns Ident if Done, 0 else, i.e. if <item> is null
285 -- If <name> is empty, works as AddItem (i.e. with no name)
286 -- If <item> is already known but with no attached Name, this
287 -- method tries to attached a Name to it
288 -- <active> if True commands call to SetActive (see below)
289
290 SetActive (me : mutable; item : mutable Transient; mode : Boolean)
291 returns Boolean;
292 ---Purpose : Following the type of <item> :
293 -- - Dispatch : Adds or Removes it in the ShareOut & FileNaming
294 -- - GeneralModifier : Adds or Removes it for final sending
295 -- (i.e. in the ModelCopier)
296 -- Returns True if it did something, False else (state unchanged)
297
298 RemoveNamedItem (me : mutable; name : CString) returns Boolean;
299 ---Purpose : Removes an Item from the Session, given its Name
300 -- Returns True if Done, False else (Name not recorded)
301 -- (Applies only on Item which are Named)
302
303 RemoveName (me : mutable; name : CString) returns Boolean;
304 ---Purpose : Removes a Name without removing the Item
305 -- Returns True if Done, False else (Name not recorded)
306
307 RemoveItem (me : mutable; item : Transient) returns Boolean;
308 ---Purpose : Removes an Item given its Ident. Returns False if <id> is
309 -- attached to no Item in the WorkSession. For a Named Item,
310 -- also removes its Name.
311
312 ClearItems (me : mutable);
313 ---Purpose : Clears all the recorded Items : Selections, Dispatches,
314 -- Modifiers, and Strings & IntParams, with their Idents & Names.
315 -- Remark that if a Model has been loaded, it is not cleared.
316
317 ItemLabel (me; id : Integer) returns HAsciiString from TCollection;
318 ---Purpose : Returns a Label which illustrates the content of an Item,
319 -- given its Ident. This Label is :
320 -- - for a Text Parameter, "Text:<text value>"
321 -- - for an Integer Parameter, "Integer:<integer value>"
322 -- - for a Selection, a Dispatch or a Modifier, its Label
323 -- (see these classes)
324 -- - for any other kind of Variable, its cdl type
325
326 ItemIdents (me; type : Type) returns HSequenceOfInteger from TColStd;
327 ---Purpose : Fills a Sequence with the List of Idents attached to the Items
328 -- of which Type complies with (IsKind) <type> (alphabetic order)
329 -- Remark : <type> = TYPE(Standard_Transient) gives all the
330 -- Idents which are suitable in the WorkSession
331
332 ItemNames (me; type : Type) returns HSequenceOfHAsciiString from TColStd;
333 ---Purpose : Fills a Sequence with the list of the Names attached to Items
334 -- of which Type complies with (IsKind) <type> (alphabetic order)
335 -- Remark : <type> = TYPE(Standard_Transient) gives all the Names
336
337 ItemNamesForLabel (me; label : CString) returns HSequenceOfHAsciiString;
338 ---Purpose : Fills a Sequence with the NAMES of the control items, of which
339 -- the label matches <label> (contain it) : see NextIdentForLabel
340 -- Search mode is fixed to "contained"
341 -- If <label> is empty, returns all Names
342
343 NextIdentForLabel (me; label : CString; id : Integer; mode : Integer = 0)
344 returns Integer;
345 ---Purpose : For query by Label with possible iterations
346 -- Searches the Ident of which Item has a Label which matches a
347 -- given one, the search starts from an initial Ident.
348 -- Returns the first found Ident which follows <id>, or ZERO
349 --
350 -- The search must start with <id> = 0, it returns the next Ident
351 -- which matches. To iterate, call again this method which this
352 -- returned value as <id>. Once an Ident has been returned, the
353 -- Item can be obtained by the method Item
354 --
355 -- <mode> precises the required matching mode :
356 -- - 0 (Default) : <label> must match exactly with the Item Label
357 -- - 1 : <label> must match the exact beginning (the end is free)
358 -- - 2 : <label> must be at least once wherever in the Item Label
359 -- - other values are ignored
360
361 -- -- List of Parameters -- --
362 -- They are Integer (IntParam) and Text (HAsciiString from TCollection)
363
364 NewParamFromStatic (me : mutable; statname : CString; name : CString = "")
365 returns mutable Transient;
366 ---Purpose : Creates a parameter as being bound to a Static
367 -- If the Static is Integer, this creates an IntParam bound to
368 -- it by its name. Else this creates a String which is the value
369 -- of the Static.
370 -- Returns a null handle if <statname> is unknown as a Static
371
372 IntParam (me; id : Integer) returns mutable IntParam;
373 ---Purpose : Returns an IntParam, given its Ident in the Session
374 -- Null result if <id> is not suitable for an IntParam
375 -- (undefined, or defined for another kind of variable)
376
377 IntValue (me; it : IntParam) returns Integer;
378 ---Purpose : Returns Integer Value of an IntParam
379
380 NewIntParam (me : mutable; name : CString = "") returns mutable IntParam;
381 ---Purpose : Creates a new IntParam. A Name can be set (Optional)
382 -- Returns the created IntParam, or a Null Handle in case of
383 -- Failure (see AddItem/AddNamedItem)
384
385 SetIntValue (me : mutable; it : mutable IntParam; val : Integer)
386 returns Boolean;
387 ---Purpose : Changes the Integer Value of an IntParam
388 -- Returns True if Done, False if <it> is not in the WorkSession
389
390
391 TextParam (me; id : Integer) returns mutable HAsciiString from TCollection;
392 ---Purpose : Returns a TextParam, given its Ident in the Session
393 -- Null result if <id> is not suitable for a TextParam
394 -- (undefined, or defined for another kind of variable)
395
396 TextValue (me; par : HAsciiString from TCollection)
397 returns AsciiString from TCollection;
398 ---Purpose : Returns Text Value of a TextParam (a String)
399 -- or an empty string if <it> is not in the WorkSession
400
401 NewTextParam (me : mutable; name : CString = "")
402 returns mutable HAsciiString from TCollection;
403 ---Purpose : Creates a new (empty) TextParam. A Name can be set (Optional)
404 -- Returns the created TextParam (as an HAsciiString), or a Null
405 -- Handle in case of Failure (see AddItem/AddNamedItem)
406
407 SetTextValue (me : mutable; par : mutable HAsciiString from TCollection;
408 val : CString) returns Boolean;
409 ---Purpose : Changes the Text Value of a TextParam (an HAsciiString)
410 -- Returns True if Done, False if <it> is not in the WorkSession
411
412 -- -- List of Signatures -- --
413
414 Signature (me; id : Integer) returns mutable Signature;
415 ---Purpose : Returns a Signature, given its Ident in the Session
416 -- Null result if <id> is not suitable for a Signature
417 -- (undefined, or defined for another kind of variable)
418
419 SignValue (me; sign : Signature; ent : Transient) returns CString;
420 ---Purpose : Returns the Value computed by a Signature for an Entity
421 -- Returns an empty string if the entity does not belong to the
422 -- loaded model
423
424 -- -- List of Selections -- --
425
426 Selection (me; id : Integer) returns mutable Selection;
427 ---Purpose : Returns a Selection, given its Ident in the Session
428 -- Null result if <id> is not suitable for a Selection
429 -- (undefined, or defined for another kind of variable)
430
431 EvalSelection (me; sel : Selection) returns EntityIterator
432 ---Purpose : Evaluates the effect of a Selection applied on the input Model
433 -- Returned Result remains empty if no input Model has been set
434 raises DomainError;
435 -- If ErrorHandle has been set and if an Error occurs, the
436 -- exception is caught and the result is returned empty
437 -- Else, the exception remains raised
438
439 Sources (me; sel : Selection) returns SelectionIterator;
440 ---Purpose : Returns the Selections which are source of Selection, given
441 -- its rank in the List of Selections (see SelectionIterator)
442 -- Returned value is empty if <num> is out of range or if
443 -- <sel> is not in the WorkSession
444
445 SelectionResult (me; sel : Selection) returns
446 HSequenceOfTransient from TColStd raises DomainError;
447 ---Purpose : Returns the result of a Selection, computed by EvalSelection
448 -- (see above) under the form of a HSequence (hence, it can be
449 -- used by a frontal-engine logic). It can be empty
450 -- Returns a Null Handle if <sel> is not in the WorkSession
451
452 SelectionResultFromList (me; sel : Selection; list : HSequenceOfTransient)
453 returns HSequenceOfTransient from TColStd raises DomainError;
454 ---Purpose : Returns the result of a Selection, by forcing its input with
455 -- a given list <list> (unless <list> is Null).
456 -- RULES :
457 -- <list> applies only for a SelectDeduct kind Selection :
458 -- its Input is considered : if it is a SelectDeduct kind
459 -- Selection, its Input is considered, etc... until an Input
460 -- is not a Deduct/Extract : its result is replaced by <list>
461 -- and all the chain of deductions is applied
462
463
464 SetItemSelection (me : mutable; item : mutable Transient;
465 sel : mutable Selection) returns Boolean;
466 ---Purpose : Sets a Selection as input for an item, according its type :
467 -- if <item> is a Dispatch : as Final Selection
468 -- if <item> is a GeneralModifier (i.e. any kind of Modifier) :
469 -- as Selection used to filter entities to modify
470 -- <sel> Null causes this Selection to be nullified
471 -- Returns False if <item> is not of a suitable type, or
472 -- <item> or <sel> is not in the WorkSession
473
474 ResetItemSelection (me : mutable; item : mutable Transient) returns Boolean;
475 ---Purpose : Resets input Selection which was set by SetItemSelection
476 -- Same conditions as for SetItemSelection
477 -- Returns True if done, False if <item> is not in the WorkSession
478
479 ItemSelection (me; item : Transient) returns mutable Selection;
480 ---Purpose : Returns the Selection of a Dispatch or a GeneralModifier.
481 -- Returns a Null Handle if none is defined or <item> not good type
482
483 -- -- Counters -- --
484 -- a Counter can be used directly
485 -- it can also be recorded as control item of the WorkSession, then :
486 -- - it is cleared by ClearData (1 or 4)
487 -- - when it is defined by a Selection, it can be recomputed
488
489 SignCounter (me; id : Integer) returns mutable SignCounter;
490 ---Purpose : Returns a SignCounter from its ident in the Session
491 -- Null result if <id> is not suitable for a SignCounter
492 -- (undefined, or defined for another kind of variable)
493
494 ComputeCounter (me : mutable; counter : SignCounter;
495 forced : Boolean=Standard_False) returns Boolean;
496 ---Purpose : Computes the content of a SignCounter when it is defined with
497 -- a Selection, then returns True
498 -- Returns False if the SignCounter is not defined with a
499 -- Selection, or if its Selection Mode is inhibited
500 -- <forced> to work around optimisations
501
502 ComputeCounterFromList (me : mutable; counter : SignCounter;
503 list : HSequenceOfTransient; clear : Boolean = Standard_True)
504 returns Boolean;
505 ---Purpose : Computes the content of a SignCounter from an input list
506 -- If <list> is Null, uses internal definition of the Counter :
507 -- a Selection, else the whole Model (recomputation forced)
508 -- If <clear> is True (D), starts from scratch
509 -- Else, cumulates computations
510
511 -- -- Dispatches (stored by ShareOut) -- --
512
513 AppliedDispatches (me) returns HSequenceOfInteger from TColStd;
514 ---Purpose : Returns the ordered list of dispatches stored by the ShareOut
515
516 ClearShareOut (me : mutable; onlydisp : Boolean);
517 ---Purpose : Clears the list of Dispatches recorded by the ShareOut
518 -- if <only> disp is True, tha's all. Else, clears also the lists
519 -- of Modifiers recorded by the ShareOut
520
521 Dispatch (me; id : Integer) returns mutable Dispatch;
522 ---Purpose : Returns a Dispatch, given its Ident in the Session
523 -- Null result if <id> is not suitable for a Dispatch
524 -- (undefined, or defined for another kind of variable)
525
526
527 DispatchRank (me; disp : Dispatch) returns Integer;
528 ---Purpose : Returns the rank of a Dispatch in the ShareOut, or 0 if <disp>
529 -- is not in the ShareOut or not in the WorkSession
530
531 -- -- Modifiers (cf also ModelCopier) -- --
532 -- A Modifier can be applied to : final sending (all dispatches),
533 -- final sending but for one specific Dispatch, or another action
534 --
535 -- Modifiers can be, either active for final sending to file (managed
536 -- by the ModelCopier), or not.
537 -- Here, Management of Modifiers (except the global list) concerns
538 -- only active Modifiers for the final sending.
539 -- But Criteria (Selection,Dispatch) are suitable for every kind of
540 -- Modifier, i.e. for GeneralModifier (also applies to IFAdapt kinds
541 -- of Modifiers, which apply during the Copy operation itself)
542
543 ModelCopier (me) returns mutable ModelCopier;
544 ---Purpose : Gives access to the complete ModelCopier
545
546 SetModelCopier (me : mutable; copier : mutable ModelCopier);
547 ---Purpose : Sets a new ModelCopier. Fills Items which its content
548 ---Warning : all data recorded in the former ModelCopier are lost
549 -- (thus, Final Modifiers become inactive)
550
551 NbFinalModifiers (me; formodel : Boolean) returns Integer;
552 ---Purpose : Returns the count of Modifiers applied to final sending
553 -- Model Modifiers if <formodel> is True, File Modifiers else
554 -- (i.e. Modifiers which apply once the Models have been filled)
555
556 FinalModifierIdents (me; formodel : Boolean)
557 returns HSequenceOfInteger from TColStd;
558 ---Purpose : Fills a Sequence with a list of Idents, those attached to
559 -- the Modifiers applied to final sending.
560 -- Model Modifiers if <formodel> is True, File Modifiers else
561 -- This list is given in the order in which they will be applied
562 -- (which takes into account the Changes to Modifier Ranks)
563
564 GeneralModifier (me; id : Integer)
565 returns mutable GeneralModifier;
566 ---Purpose : Returns a Modifier, given its Ident in the Session
567 -- Null result if <id> is not suitable for a Modifier
568 -- (undefined, or defined for another kind of variable)
569
570 ModelModifier (me; id : Integer) returns mutable Modifier;
571 ---Purpose : Returns a Model Modifier, given its Ident in the Session,
572 -- i.e. typed as a Modifier (not simply a GeneralModifier)
573 -- Null result if <id> is not suitable for a Modifier
574 -- (undefined, or defined for another kind of variable)
575
576 ModifierRank (me; item : GeneralModifier) returns Integer;
577 ---Purpose : Returns the Rank of a Modifier given its Ident. Model or File
578 -- Modifier according its type (ModelModifier or not)
579 -- Remember that Modifiers are applied sequencially following
580 -- their Rank : first Model Modifiers then File Modifiers
581 -- Rank is given by rank of call to AddItem and can be
582 -- changed by ChangeModifierRank
583
584 ChangeModifierRank (me : mutable;
585 formodel : Boolean; before, after : Integer) returns Boolean;
586 ---Purpose : Changes the Rank of a Modifier in the Session :
587 -- Model Modifiers if <formodel> is True, File Modifiers else
588 -- the Modifier n0 <before> is put to n0 <after>
589 -- Return True if Done, False if <before> or <after> out of range
590
591 ClearFinalModifiers (me : mutable);
592 ---Purpose : Removes all the Modifiers active in the ModelCopier : they
593 -- become inactive and they are removed from the Session
594
595 SetAppliedModifier (me : mutable; modif : mutable GeneralModifier;
596 item : mutable Transient) returns Boolean;
597 ---Purpose : Sets a GeneralModifier to be applied to an item :
598 -- - item = ShareOut : applies for final sending (all dispatches)
599 -- - item is a Dispatch : applies for this dispatch only
600 -- Returns True if done, False if <modif> or <item> not in <me>
601
602 ResetAppliedModifier (me : mutable; modif : mutable GeneralModifier)
603 returns Boolean;
604 ---Purpose : Resets a GeneralModifier to be applied
605 -- Returns True if done, False if <modif> was not applied
606
607 UsesAppliedModifier (me; modif : GeneralModifier) returns mutable Transient;
608 ---Purpose : Returns the item on which a GeneralModifier is applied :
609 -- the ShareOut, or a given Dispatch
610 -- Returns a Null Handle if <modif> is not applied
611
612 -- -- Transformation (without sending) -- --
613
614 Transformer (me; id : Integer) returns mutable Transformer;
615 ---Purpose : Returns a Transformer, given its Ident in the Session
616 -- Null result if <id> is not suitable for a Transformer
617 -- (undefined, or defined for another kind of variable)
618
619 RunTransformer (me : mutable; transf : Transformer) returns Integer;
620 ---Purpose : Runs a Transformer on starting Model, which can then be edited
621 -- or replaced by a new one. The Protocol can also be changed.
622 -- Fills LastRunCheckList
623 --
624 -- Returned status is 0 if nothing done (<transf> or model
625 -- undefined), positive if OK, negative else :
626 -- 0 : Nothing done
627 -- 1 : OK, edition on the spot with no change to the graph
628 -- of dependances (purely local)
629 -- 2 : OK, model edited on the spot (graph recomputed, may
630 -- have changed), protocol unchanged
631 -- 3 : OK, new model produced, same protocol
632 -- 4 : OK, model edited on the spot (graph recomputed),
633 -- but protocol has changed
634 -- 5 : OK, new model produced, protocol has changed
635 -- -1 : Error on the spot (slight changes), data may be corrupted
636 -- (remark : corruption should not be profound)
637 -- -2 : Error on edition the spot, data may be corrupted
638 -- (checking them is recommanded)
639 -- -3 : Error with a new data set, transformation ignored
640 -- -4 : OK as 4, but graph of dependances count not be recomputed
641 -- (the former one is kept) : check the protocol
642
643 RunModifier (me : mutable; modif : Modifier; copy : Boolean)
644 returns Integer;
645 ---Purpose : Runs a Modifier on Starting Model. It can modify entities, or
646 -- add new ones. But the Model or the Protocol is unchanged.
647 -- The Modifier is applied on each entity of the Model. See also
648 -- RunModifierSelected
649 -- Fills LastRunCheckList
650 --
651 -- <copy> : if True, a new data set is produced which brings
652 -- the modifications (Model + its Entities)
653 -- if False, data are modified on the spot
654 --
655 -- It works through a TransformStandard defined with <modif>
656 -- Returned status as RunTransformer : 0 nothing done, >0 OK,
657 -- <0 problem, but only between -3 and 3 (protocol unchanged)
658 -- Remark : <copy> True will give <effect> = 3 or -3
659
660 RunModifierSelected (me : mutable; modif : Modifier;
661 sel : Selection; copy : Boolean)
662 returns Integer;
663 ---Purpose : Acts as RunModifier, but the Modifier is applied on the list
664 -- determined by a Selection, rather than on the whole Model
665 -- If the selection is a null handle, the whole model is taken
666
667 NewTransformStandard (me : mutable; copy : Boolean; name : CString = "")
668 returns mutable Transformer;
669 ---Purpose : Creates and returns a TransformStandard, empty, with its
670 -- Copy Option (True = Copy, False = On the Spot) and an
671 -- optional name.
672 -- To a TransformStandard, the method SetAppliedModifier applies
673
674 SetModelContent (me : mutable; sel : Selection; keep : Boolean)
675 returns Boolean;
676 ---Purpose : Defines a new content from the former one
677 -- If <keep> is True, it is given by entities selected by
678 -- Selection <sel> (and all shared entities)
679 -- Else, it is given by all the former content but entities
680 -- selected by the Selection <sel> (and properly shared ones)
681 -- Returns True if done. Returns False if the selected list
682 -- (from <sel>) is empty, hence nothing is done
683
684 -- -- File and Transfer Management -- --
685
686 FilePrefix (me) returns HAsciiString from TCollection;
687 ---Purpose : Returns the defined File Prefix. Null Handle if not defined
688
689 DefaultFileRoot (me) returns HAsciiString from TCollection;
690 ---Purpose : Returns the defined Default File Root. It is used for
691 -- Dispatches which have no specific root attached.
692 -- Null Handle if not defined
693
694 FileExtension (me) returns HAsciiString from TCollection;
695 ---Purpose : Returns the defined File Extension. Null Handle if not defined
696
697 FileRoot (me; disp : Dispatch) returns HAsciiString from TCollection;
698 ---Purpose : Returns the File Root defined for a Dispatch. Null if no
699 -- Root Name is defined for it (hence, no File will be produced)
700
701 SetFilePrefix (me : mutable; name : CString);
702 ---Purpose : Defines a File Prefix
703
704 SetDefaultFileRoot (me : mutable; name : CString) returns Boolean;
705 ---Purpose : Defines a Default File Root Name. Clears it is <name> = ""
706 -- Returns True if OK, False if <name> already set for a Dispatch
707
708 SetFileExtension (me : mutable; name : CString);
709 ---Purpose : Defines a File Extension
710
711 SetFileRoot (me : mutable; disp : Dispatch; name : CString) returns Boolean;
712 ---Purpose : Defines a Root for a Dispatch
713 -- If <name> is empty, clears Root Name
714 -- This has as effect to inhibit the production of File by <disp>
715 -- Returns False if <disp> is not in the WorkSession or if a
716 -- root name is already defined for it
717
718 GiveFileRoot (me; file : CString) returns CString;
719 ---Purpose : Extracts File Root Name from a given complete file name
720 -- (uses OSD_Path)
721
722 GiveFileComplete (me; file : CString) returns CString;
723 ---Purpose : Completes a file name as required, with Prefix and Extension
724 -- (if defined; for a non-defined item, completes nothing)
725
726 ClearFile (me : mutable);
727 ---Purpose : Erases all stored data from the File Evaluation
728 -- (i.e. ALL former naming informations are lost)
729
730 EvaluateFile (me : mutable);
731 ---Purpose : Performs and stores a File Evaluation. The Results are a List
732 -- of produced Models and a List of names (Strings), in parallel
733 -- Fills LastRunCheckList
734
735 NbFiles (me) returns Integer;
736 ---Purpose : Returns the count of produced Models
737
738 FileModel (me; num : Integer) returns mutable InterfaceModel;
739 ---Purpose : Returns a Model, given its rank in the Evaluation List
740
741 FileName (me; num : Integer) returns AsciiString from TCollection;
742 ---Purpose : Returns the name of a file corresponding to a produced Model,
743 -- given its rank in the Evaluation List
744
745 BeginSentFiles (me : mutable; record : Boolean);
746 ---Purpose : Commands file sending to clear the list of already sent files,
747 -- commands to record a new one if <record> is True
748 -- This list is managed by the ModelCopier when SendSplit is called
749 -- It allows a global exploitation of the set of sent files
750
751 SentFiles (me) returns HSequenceOfHAsciiString;
752 ---Purpose : Returns the list of recorded sent files, or a Null Handle is
753 -- recording has not been enabled
754
755
756 SendSplit (me : mutable) returns Boolean;
757 ---Purpose : Performs creation of derived files from the input Model
758 -- Takes its data (sub-models and names), from result EvaluateFile
759 -- if active, else by dynamic Evaluation (not stored)
760 -- After SendSplit, result of EvaluateFile is Cleared
761 -- Fills LastRunCheckList
762 --
763 -- Works with the WorkLibrary which acts on specific type of Model
764 -- and can work with File Modifiers (managed by the Model Copier)
765 -- and a ModelCopier, which can work with Model Modifiers
766 -- Returns False if, either WorkLibrary has failed on at least
767 -- one sub-file, or the Work Session is badly conditionned
768 -- (no Model defined, or FileNaming not in phase with ShareOut)
769
770 EvalSplit (me) returns PacketList;
771 ---Purpose : Returns an Evaluation of the whole ShareOut definition : i.e.
772 -- how the entities of the starting model are forecast to be sent
773 -- to various files : list of packets according the dispatches,
774 -- effective lists of roots for each packet (which determine the
775 -- content of the corresponding file); plus evaluation of which
776 -- entities are : forgotten (sent into no file), duplicated (sent
777 -- into more than one file), sent into a given file.
778 -- See the class PacketList for more details.
779
780 SentList (me; count : Integer = -1) returns EntityIterator;
781 ---Purpose : Returns the list of Entities sent in files, accourding the
782 -- count of files each one has been sent (these counts are reset
783 -- by SetModel or SetRemaining(Forget) ) stored in Graph Status
784 -- <count> = -1 (default) is for ENtities sent at least once
785 -- <count> = 0 is for the Remaining List (entities not yet sent)
786 -- <count> = 1 is for entities sent in one and only one file
787 -- (the ideal case)
788 -- Remaining Data are computed on each Sending/Copying output
789 -- files (see methods EvaluateFile and SendSplit)
790 -- Graph Status is 0 for Remaining Entity, <count> for Sent into
791 -- <count> files
792 -- This status is set to 0 (not yet sent) for all by SetModel
793 -- and by SetRemaining(mode=Forget,Display)
794
795 MaxSendingCount (me) returns Integer;
796 ---Purpose : Returns the greater count of different files in which any of
797 -- the starting entities could be sent.
798 -- Before any file output, this count is 0.
799 -- Ideal count is 1. More than 1 means that duplications occur.
800
801 SetRemaining (me : mutable; mode : RemainMode) returns Boolean;
802 ---Purpose : Processes Remaining data (after having sent files), mode :
803 -- Forget : forget remaining info (i.e. clear all "Sent" status)
804 -- Compute : compute and keep remaining (does nothing if :
805 -- remaining is empty or if no files has been sent)
806 -- Display : display entities recorded as remaining
807 -- Undo : restore former state of data (after Remaining(1) )
808 -- Returns True if OK, False else (i.e. mode = 2 and Remaining
809 -- List is either empty or takes all the entities, or mode = 3
810 -- and no former computation of remaining data was done)
811
812
813 SendAll (me : mutable; filename : CString;
814 computegraph : Boolean = Standard_False) returns ReturnStatus;
815 ---Purpose : Sends the starting Model into one file, without splitting,
816 -- managing remaining data or anything else.
817 -- <computegraph> true commands the Graph to be recomputed before
818 -- sending : required when a Model is filled in several steps
819 --
820 -- The Model and File Modifiers recorded to be applied on sending
821 -- files are.
12bf87c5
P
822 -- Returns a status of execution :
823 -- Done if OK,
824 -- Void if no data available,
825 -- Error if errors occured (work library is not defined), errors
826 -- during translation
827 -- Fail if exception during translation is raised
828 -- Stop if no disk space or disk, file is write protected
7fd59977 829 -- Fills LastRunCheckList
830
831 SendSelected (me : mutable; filename : CString; sel : Selection;
832 computegraph : Boolean = Standard_False) returns ReturnStatus;
833 ---Purpose : Sends a part of the starting Model into one file, without
834 -- splitting. But remaining data are managed.
835 -- <computegraph> true commands the Graph to be recomputed before
836 -- sending : required when a Model is filled in several steps
837 --
838 -- The Model and File Modifiers recorded to be applied on sending
839 -- files are.
840 -- Returns a status : Done if OK, Fail if error during send,
841 -- Error : WorkLibrary not defined, Void : selection list empty
842 -- Fills LastRunCheckList
843
844 WriteFile (me : mutable; filename : CString) returns ReturnStatus;
845 ---Purpose : Writes the current Interface Model globally to a File, and
846 -- returns a write status which can be :
847 -- Done OK, Fail file could not be written, Error no norm is selected
848 -- Remark : It is a simple, one-file writing, other operations are
849 -- available (such as splitting ...) which calls SendAll
850
851 WriteFile (me : mutable; filename : CString; sel : Selection from IFSelect)
852 returns ReturnStatus;
853 ---Purpose : Writes a sub-part of the current Interface Model to a File,
854 -- as defined by a Selection <sel>, recomputes the Graph, and
855 -- returns a write status which can be :
856 -- Done OK, Fail file could not be written, Error no norm is selected
857 -- Remark : It is a simple, one-file writing, other operations are
858 -- available (such as splitting ...) which calls SendSelected
859
860 -- -- Some General Purpose Selections -- --
861
862 NbSources (me; sel : Selection) returns Integer;
863 ---Purpose : Returns the count of Input Selections known for a Selection,
864 -- or 0 if <sel> not in the WorkSession. This count is one for a
865 -- SelectDeduct / SelectExtract kind, two for SelectControl kind,
866 -- variable for a SelectCombine (Union/Intersection), zero else
867
868 Source (me; sel : Selection; num : Integer = 1) returns mutable Selection;
869 ---Purpose : Returns the <num>th Input Selection of a Selection
870 -- (see NbSources).
871 -- Returns a Null Handle if <sel> is not in the WorkSession or if
872 -- <num> is out of the range <1-NbSources>
873 -- To obtain more details, see the method Sources
874
875 IsReversedSelectExtract (me; sel : Selection) returns Boolean;
876 ---Purpose : Returns True if <sel> a Reversed SelectExtract, False else
877
878 ToggleSelectExtract (me : mutable; sel : mutable Selection) returns Boolean;
879 ---Purpose : Toggles the Sense (Direct <-> Reversed) of a SelectExtract
880 -- Returns True if Done, False if <sel> is not a SelectExtract or
881 -- is not in the WorkSession
882
883 SetInputSelection (me : mutable; sel, input : mutable Selection)
884 returns Boolean;
885 ---Purpose : Sets an Input Selection (as <input>) to a SelectExtract or
886 -- a SelectDeduct (as <sel>).
887 -- Returns True if Done, False if <sel> is neither a
888 -- SelectExtract nor a SelectDeduct, or not in the WorkSession
889
890
891 SetControl (me : mutable; sel, sc : mutable Selection;
892 formain : Boolean = Standard_True) returns Boolean;
893 ---Purpose : Sets an Input Selection, Main if <formain> is True, Second else
894 -- (as <sc>) to a SelectControl (as <sel>). Returns True if Done,
895 -- False if <sel> is not a SelectControl, or <sc> or <sel> is not
896 -- in the WorkSession
897
898 CombineAdd (me : mutable; selcomb, seladd : mutable Selection;
899 atnum : Integer = 0) returns Integer;
900 ---Purpose : Adds an input selection to a SelectCombine (Union or Inters.).
901 -- Returns new count of inputs for this SelectCombine if Done or
902 -- 0 if <sel> is not kind of SelectCombine, or if <seladd> or
903 -- <sel> is not in the WorkSession
904 -- By default, adding is done at the end of the list
905 -- Else, it is an insertion to rank <atnum> (usefull for Un-ReDo)
906
907 CombineRemove (me : mutable; selcomb, selrem : mutable Selection)
908 returns Boolean;
909 ---Purpose : Removes an input selection from a SelectCombine (Union or
910 -- Intersection). Returns True if done, False if <selcomb> is not
911 -- kind of SelectCombine or <selrem> is not source of <selcomb>
912
913 NewSelectPointed (me : mutable; list : HSequenceOfTransient; name : CString)
914 returns mutable Selection;
915 ---Purpose : Creates a new Selection, of type SelectPointed, its content
916 -- starts with <list>. A name must be given (can be empty)
917
918 SetSelectPointed (me; sel : mutable Selection; list : HSequenceOfTransient;
919 mode : Integer) returns Boolean;
920 ---Purpose : Changes the content of a Selection of type SelectPointed
921 -- According <mode> : 0 set <list> as new content (clear former)
922 -- 1 : adds <list> to actual content
923 -- -1 : removes <list> from actual content
924 -- Returns True if done, False if <sel> is not a SelectPointed
925
926 -- -- Various Evaluations -- --
927
928 GiveSelection (me; selname : CString) returns Selection;
929 ---Purpose : Returns a Selection from a Name :
930 -- - the name of a Selection : this Selection
931 -- - the name of a Signature + criteria between (..) : a new
932 -- Selection from this Signature
933 -- - an entity or a list of entities : a new SelectPointed
934 -- Else, returns a Null Handle
935
936 GiveList (me; obj : Transient) returns HSequenceOfTransient;
937 ---Purpose : Determines a list of entities from an object :
938 -- <obj> already HSequenceOfTransient : returned itself
939 -- <obj> Selection : its Result of Evaluation is returned
940 -- <obj> an entity of the Model : a HSequence which contains it
941 -- else, an empty HSequence
942 -- <obj> the Model it self : ALL its content (not only the roots)
943
944 GiveList (me; first : CString; second : CString = "")
945 returns HSequenceOfTransient;
946 ---Purpose : Computes a List of entities from two alphanums,
947 -- first and second, as follows :
948 -- if <first> is a Number or Label of an entity : this entity
949 -- if <first> is a list of Numbers/Labels : the list of entities
950 -- if <first> is the name of a Selection in <WS>, and <second>
951 -- not defined, the standard result of this Selection
952 -- else, let's consider "first second" : this whole phrase is
953 -- splitted by blanks, as follows (RECURSIVE CALL) :
954 -- - the leftest term is the final selection
955 -- - the other terms define the result of the selection
956 -- - and so on (the "leftest minus one" is a selection, of which
957 -- the input is given by the remaining ...)
958
959 GiveListFromList (me; selname : CString; ent : Transient)
960 returns HSequenceOfTransient;
961 ---Purpose : Computes a List of entities from the model as follows
962 -- <first> beeing a Selection or a combination of Selections,
963 -- <ent> beeing an entity or a list
964 -- of entities (as a HSequenceOfTransient) :
965 -- the standard result of this selection applied to this list
966 -- if <ent> is Null, the standard definition of the selection is
967 -- used (which contains a default input selection)
968 -- if <selname> is erroneous, a null handle is returned
969 --
970 -- REMARK : selname is processed as <first second> of preceeding
971 -- GiveList
972
973 GiveListCombined (me; l1, l2 : HSequenceOfTransient; mode : Integer)
974 returns HSequenceOfTransient;
975 ---Purpose : Combines two lists and returns the result, according to mode :
976 -- <mode> < 0 : entities in <l1> AND NOT in <l2>
977 -- <mode> = 0 : entities in <l1> AND in <l2>
978 -- <mode> > 0 : entities in <l1> OR in <l2>
979
980 QueryCheckList (me : mutable; chl : CheckIterator);
981 ---Purpose : Loads data from a check iterator to query status on it
982
983 QueryCheckStatus (me; ent : Transient) returns Integer;
984 ---Purpose : Determines check status for an entity regarding last call to
985 -- QueryCheckList :
986 -- -1 : <ent> unknown in the model, ignored
987 -- 0 : no check at all, immediate or inherited thru Graph
988 -- 1 : immediate warning (no fail), no inherited check
989 -- 2 : immediate fail, no inherited check
990 -- +10 : idem but some inherited warning (no fail)
991 -- +20 : idem but some inherited fail
992
993 QueryParent (me; entdad, entson : Transient) returns Integer;
994 ---Purpose : Determines if <entdad> is parent of <entson> (in the graph),
995 -- returns : -1 if no; 0 if <entdad> = <entson>
996 -- 1 if immediate parent, > 1 if parent, gives count of steps
997
998 -- -- Dumps, Evaluations (displayed on standard output) -- --
999
1000 SetParams (me : mutable;
1001 params : SequenceOfTransient;
1002 uselist : SequenceOfInteger);
1003 ---Purpose : Sets a list of Parameters, i.e. TypedValue, to be handled
1004 -- through an Editor
1005 -- The two lists are parallel, if <params> is longer than <uses>,
1006 -- surnumeral parameters are for general use
1007 --
1008 -- EditForms are created to handle these parameters (list, edit)
1009 -- on the basis of a ParamEditor xst-params-edit
1010 --
1011 -- A use number dispatches the parameter to a given EditForm
1012 -- EditForms are defined as follows
1013 -- Name Use Means
1014 -- xst-params all All Parameters (complete list)
1015 -- xst-params-general 1 Generals
1016 -- xst-params-load 2 LoadFile (no Transfer)
1017 -- xst-params-send 3 SendFile (Write, no Transfer)
1018 -- xst-params-split 4 Split
1019 -- xst-param-read 5 Transfer on Reading
1020 -- xst-param-write 6 Transfer on Writing
1021
1022 TraceStatics (me; use : Integer; mode : Integer = 0);
1023 ---Purpose : Traces the Statics attached to a given use number
1024 -- If <use> is given positive (normal), the trace is embedded
1025 -- with a header and a trailer
1026 -- If <use> is negative, just values are printed
1027 -- (this allows to make compositions)
1028 -- Remark : use number 5 commands use -2 to be traced
1029 -- Remark : use numbers 4 and 6 command use -3 to be traced
1030
1031 DumpShare (me);
1032 ---Purpose : Dumps contents of the ShareOut (on "cout")
1033
1034 ListItems (me; label : CString = "");
1035 ---Purpose : Lists the Labels of all Items of the WorkSession
1036 -- If <label> is defined, lists labels which contain it
1037
1038 ListFinalModifiers (me; formodel : Boolean);
1039 ---Purpose : Lists the Modifiers of the session (for each one, displays
1040 -- its Label). Listing is done following Ranks (Modifiers are
1041 -- invoked following their ranks)
1042 -- Model Modifiers if <formodel> is True, File Modifiers else
1043
1044 DumpSelection (me; sel : Selection);
1045 ---Purpose : Lists a Selection and its Sources (see SelectionIterator),
1046 -- given its rank in the list
1047
1048 DumpModel (me : mutable; level : Integer; S : Messenger from Message);
1049 ---Purpose : Lists the content of the Input Model (if there is one)
1050 -- According level : 0 -> gives only count of Entities and Roots
1051 -- 1 -> Lists also Roots; 2 -> Lists all Entities (by TraceType)
1052 -- 3 -> Performs a call to CheckList (Fails) and lists the result
1053 -- 4 -> as 3 but all CheckList (Fails + Warnings)
1054 -- 5,6,7 : as 3 but resp. Count,List,Labels by Fail
1055 -- 8,9,10 : as 4 but resp. Count,List,Labels by message
1056
1057 TraceDumpModel (me : mutable; mode : Integer);
1058 ---Purpose : Dumps the current Model (as inherited DumpModel), on currently
1059 -- defined Default Trace File (default is standard output)
1060
1061 DumpEntity (me; ent : Transient; level : Integer; S : Messenger from Message);
1062 ---Purpose : Dumps a starting entity according to the current norm.
1063 -- To do this, it calls DumpEntity from WorkLibrary.
1064 -- <level> is to be interpreted for each norm : see specific
1065 -- classes of WorkLibrary for it. Generally, 0 if for very basic
1066 -- (only type ...), greater values give more and more details.
1067
1068 PrintEntityStatus (me : mutable; ent : Transient; S : Messenger from Message);
1069 ---Purpose : Prints main informations about an entity : its number, type,
1070 -- validity (and checks if any), category, shareds and sharings..
1071 -- mutable because it can recompute checks as necessary
1072
1073 TraceDumpEntity (me; ent : Transient; level : Integer);
1074 ---Purpose : Dumps an entity from the current Model as inherited DumpEntity
1075 -- on currently defined Default Trace File
1076 -- (<level> interpreted according to the Norm, see WorkLibrary)
1077
1078 PrintCheckList (me; checklist : CheckIterator;
1079 failsonly : Boolean; mode : PrintCount);
1080 ---Purpose : Prints a CheckIterator to the current Trace File, controlled
1081 -- with the current Model
1082 -- complete or fails only, according to <failsonly>
1083 -- <mode> defines the mode of printing
1084 -- 0 : sequential, according entities; else with a CheckCounter
1085 -- 1 : according messages, count of entities
1086 -- 2 : id but with list of entities, designated by their numbers
1087 -- 3 : as 2 but with labels of entities
1088
1089 PrintSignatureList (me; signlist : SignatureList; mode : PrintCount);
1090 ---Purpose : Prints a SignatureList to the current Trace File, controlled
1091 -- with the current Model
1092 -- <mode> defines the mode of printing (see SignatureList)
1093
1094
1095 EvaluateSelection (me; sel : Selection);
1096 ---Purpose : Displays the list of Entities selected by a Selection (i.e.
1097 -- the result of EvalSelection).
1098
1099 EvaluateDispatch (me; disp : Dispatch; mode : Integer = 0);
1100 ---Purpose : Displays the result of applying a Dispatch on the input Model
1101 -- (also shows Remainder if there is)
1102 -- <mode> = 0 (default), displays nothing else
1103 -- <mode> = 1 : displays also duplicated entities (because of
1104 -- this dispatch)
1105 -- <mode> = 2 : displays the entities of the starting Model
1106 -- which are not taken by this dispatch (forgotten entities)
1107 -- <mode> = 3 : displays both duplicated and forgotten entities
1108 -- Remark : EvaluateComplete displays these data evaluated for
1109 -- for all the dispatches, if there are several
1110
1111 EvaluateComplete (me; mode : Integer = 0);
1112 ---Purpose : Displays the effect of applying the ShareOut on the input
1113 -- Model.
1114 -- <mode> = 0 (default) : displays only roots for each packet,
1115 -- <mode> = 1 : displays all entities for each packet, plus
1116 -- duplicated entities
1117 -- <mode> = 2 : same as <mode> = 1, plus displays forgotten
1118 -- entities (which are in no packet at all)
1119
1120 ListEntities (me; iter : EntityIterator; mode : Integer);
1121 ---Purpose : Internal method which displays an EntityIterator
1122 -- <mode> 0 gives short display (only entity numbers)
1123 -- 1 gives a more complete trace (1 line per Entity)
1124 -- (can be used each time a trace has to be output from a list)
1125 -- 2 gives a form suitable for givelist : (n1,n2,n3...)
1126
1127fields
1128
1129 theerrhand : Boolean;
1130 theshareout : ShareOut;
1131
1132 thelibrary : WorkLibrary;
1133 theprotocol : Protocol from Interface;
1134 themodel : InterfaceModel;
1135 thegraph : HGraph is protected;
1136 theloaded : AsciiString;
1137 thegtool : GTool from Interface;
1138
1139 thecheckdone : Boolean;
1140 thechecklist : CheckIterator;
1141 thecheckrun : CheckIterator is protected; -- (LastRunCheckList)
1142 thecheckana : AsciiString;
1143
1144 theitems : IndexedDataMapOfTransientTransient is protected;
1145 thenames : DictionaryOfTransient is protected;
1146
1147 thecopier : ModelCopier; -- produces + memorizes transferred data
1148 theoldel : InterfaceModel;
1149
1150end WorkSession;