Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IFSelect / IFSelect_WorkSession.cdl
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
8 class 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
17 uses 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
33 raises DomainError
34
35 is
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.
822     --           Returns a status of execution : Done if OK, Void if no def.
823     --             available, Error if errors occured, Fail if no file written
824     --           Fills LastRunCheckList
825
826     SendSelected (me : mutable; filename : CString; sel : Selection;
827              computegraph : Boolean = Standard_False) returns ReturnStatus;
828     ---Purpose : Sends a part of the starting Model into one file, without
829     --           splitting. But remaining data are managed.
830     --           <computegraph> true commands the Graph to be recomputed before
831     --           sending : required when a Model is filled in several steps
832     --           
833     --           The Model and File Modifiers recorded to be applied on sending
834     --           files are.
835     --           Returns a status : Done if OK,  Fail if error during send,
836     --            Error : WorkLibrary not defined, Void : selection list empty
837     --           Fills LastRunCheckList
838
839     WriteFile    (me : mutable; filename : CString) returns ReturnStatus;
840     ---Purpose : Writes the current Interface Model globally to a File, and
841     --           returns a write status which can be :
842     --             Done OK, Fail file could not be written, Error no norm is selected
843     -- Remark  : It is a simple, one-file writing, other operations are
844     --           available (such as splitting ...) which calls SendAll
845
846     WriteFile    (me : mutable; filename : CString; sel : Selection from IFSelect)
847          returns ReturnStatus;
848     ---Purpose : Writes a sub-part of the current Interface Model to a File,
849     --           as defined by a Selection <sel>, recomputes the Graph, and
850     --           returns a write status which can be :
851     --             Done OK, Fail file could not be written, Error no norm is selected
852     -- Remark  : It is a simple, one-file writing, other operations are
853     --           available (such as splitting ...) which calls SendSelected
854
855         -- --    Some General Purpose Selections    -- --
856
857     NbSources (me; sel : Selection) returns Integer;
858     ---Purpose : Returns the count of Input Selections known for a Selection,
859     --           or 0 if <sel> not in the WorkSession. This count is one for a
860     --           SelectDeduct / SelectExtract kind, two for SelectControl kind,
861     --           variable for a SelectCombine (Union/Intersection), zero else
862
863     Source (me; sel : Selection; num : Integer = 1) returns mutable Selection;
864     ---Purpose : Returns the <num>th Input Selection of a Selection
865     --           (see NbSources).
866     --           Returns a Null Handle if <sel> is not in the WorkSession or if
867     --           <num> is out of the range <1-NbSources>
868     --           To obtain more details, see the method Sources
869
870     IsReversedSelectExtract (me; sel : Selection) returns Boolean;
871     ---Purpose : Returns True if <sel> a Reversed SelectExtract, False else
872
873     ToggleSelectExtract (me : mutable; sel : mutable Selection) returns Boolean;
874     ---Purpose : Toggles the Sense (Direct <-> Reversed) of a SelectExtract
875     --           Returns True if Done, False if <sel> is not a SelectExtract or
876     --           is not in the WorkSession
877
878     SetInputSelection (me : mutable; sel, input : mutable Selection)
879         returns Boolean;
880     ---Purpose : Sets an Input Selection (as <input>) to a SelectExtract or
881     --           a SelectDeduct (as <sel>).
882     --           Returns True if Done, False if <sel> is neither a
883     --           SelectExtract nor a SelectDeduct, or not in the WorkSession
884
885
886     SetControl (me : mutable; sel, sc : mutable Selection;
887                 formain : Boolean = Standard_True) returns Boolean;
888     ---Purpose : Sets an Input Selection, Main if <formain> is True, Second else
889     --           (as <sc>) to a SelectControl (as <sel>). Returns True if Done,
890     --           False if <sel> is not a SelectControl, or <sc> or <sel> is not
891     --           in the WorkSession
892
893     CombineAdd  (me : mutable; selcomb, seladd : mutable Selection;
894                  atnum : Integer = 0)  returns Integer;
895     ---Purpose : Adds an input selection to a SelectCombine (Union or Inters.).
896     --           Returns new count of inputs for this SelectCombine if Done or
897     --           0 if <sel> is not kind of SelectCombine, or if <seladd> or
898     --           <sel> is not in the WorkSession
899     --           By default, adding is done at the end of the list
900     --           Else, it is an insertion to rank <atnum> (usefull for Un-ReDo)
901
902     CombineRemove (me : mutable; selcomb, selrem : mutable Selection)
903         returns Boolean;
904     ---Purpose : Removes an input selection from a SelectCombine (Union or
905     --           Intersection). Returns True if done, False if <selcomb> is not
906     --           kind of SelectCombine or <selrem> is not source of <selcomb>
907
908     NewSelectPointed (me : mutable; list : HSequenceOfTransient; name : CString)
909         returns mutable Selection;
910     ---Purpose : Creates a new Selection, of type SelectPointed, its content
911     --           starts with <list>. A name must be given (can be empty)
912
913     SetSelectPointed (me; sel : mutable Selection; list : HSequenceOfTransient;
914                       mode : Integer) returns Boolean;
915     ---Purpose : Changes the content of a Selection of type SelectPointed
916     --           According <mode> : 0  set <list> as new content (clear former)
917     --             1  : adds <list> to actual content
918     --            -1  : removes <list> from actual content
919     --           Returns True if done, False if <sel> is not a SelectPointed
920
921         -- --    Various Evaluations   -- --
922
923     GiveSelection (me; selname : CString) returns Selection;
924     ---Purpose : Returns a Selection from a Name :
925     --           - the name of a Selection : this Selection
926     --           - the name of a Signature + criteria between (..) : a new
927     --             Selection from this Signature
928     --           - an entity or a list of entities : a new SelectPointed
929     --           Else, returns a Null Handle
930
931     GiveList (me; obj : Transient) returns HSequenceOfTransient;
932     ---Purpose : Determines a list of entities from an object :
933     --           <obj> already HSequenceOfTransient : returned itself
934     --           <obj> Selection : its Result of Evaluation is returned
935     --           <obj> an entity of the Model : a HSequence which contains it
936     --           else, an empty HSequence
937     --           <obj> the Model it self : ALL its content (not only the roots)
938
939     GiveList (me; first : CString; second : CString = "")
940         returns HSequenceOfTransient;
941     ---Purpose : Computes a List of entities from two alphanums,
942     --           first and second, as follows :
943     --           if <first> is a Number or Label of an entity : this entity
944     --           if <first> is a list of Numbers/Labels : the list of entities
945     --           if <first> is the name of a Selection in <WS>, and <second>
946     --             not defined, the standard result of this Selection
947     --           else, let's consider "first second" : this whole phrase is
948     --           splitted by blanks, as follows (RECURSIVE CALL) :
949     --           - the leftest term is the final selection
950     --           - the other terms define the result of the selection
951     --           - and so on (the "leftest minus one" is a selection, of which
952     --             the input is given by the remaining ...)
953
954     GiveListFromList (me; selname : CString; ent : Transient)
955         returns HSequenceOfTransient;
956     ---Purpose : Computes a List of entities from the model as follows
957     --           <first> beeing a Selection or a combination of Selections,
958     --             <ent> beeing an entity or a list
959     --           of entities (as a HSequenceOfTransient) :
960     --             the standard result of this selection applied to this list
961     --           if <ent> is Null, the standard definition of the selection is
962     --             used (which contains a default input selection)
963     --           if <selname> is erroneous, a null handle is returned
964     --           
965     --           REMARK : selname is processed as <first second> of preceeding
966     --             GiveList
967
968     GiveListCombined (me; l1, l2 : HSequenceOfTransient; mode : Integer)
969         returns HSequenceOfTransient;
970     ---Purpose : Combines two lists and returns the result, according to mode :
971     --           <mode> < 0 : entities in <l1> AND NOT in <l2>
972     --           <mode> = 0 : entities in <l1> AND in <l2>
973     --           <mode> > 0 : entities in <l1> OR  in <l2>
974
975     QueryCheckList (me : mutable; chl : CheckIterator);
976     ---Purpose : Loads data from a check iterator to query status on it
977
978     QueryCheckStatus (me; ent : Transient) returns Integer;
979     ---Purpose : Determines check status for an entity regarding last call to
980     --           QueryCheckList :
981     --           -1 : <ent> unknown in the model, ignored
982     --            0 : no check at all, immediate or inherited thru Graph
983     --            1 : immediate warning (no fail), no inherited check
984     --            2 : immediate fail, no inherited check
985     --           +10 : idem but some inherited warning (no fail)
986     --           +20 : idem but some inherited fail
987
988     QueryParent (me; entdad, entson : Transient) returns Integer;
989     ---Purpose : Determines if <entdad> is parent of <entson> (in the graph),
990     --           returns : -1 if no; 0 if <entdad> = <entson>
991     --           1 if immediate parent, > 1 if parent, gives count of steps
992
993         -- --    Dumps, Evaluations (displayed on standard output)   -- --
994
995     SetParams (me : mutable;
996                params  : SequenceOfTransient;
997                uselist : SequenceOfInteger);
998     ---Purpose : Sets a list of Parameters, i.e. TypedValue, to be handled
999     --           through an Editor
1000     --           The two lists are parallel, if <params> is longer than <uses>,
1001     --           surnumeral parameters are for general use
1002     --           
1003     --           EditForms are created to handle these parameters (list, edit)
1004     --           on the basis of a ParamEditor  xst-params-edit
1005     --           
1006     --           A use number dispatches the parameter to a given EditForm
1007     --           EditForms are defined as follows
1008     --           Name                Use   Means
1009     --           xst-params          all   All Parameters (complete list)
1010     --           xst-params-general  1     Generals
1011     --           xst-params-load     2     LoadFile (no Transfer)
1012     --           xst-params-send     3     SendFile (Write, no Transfer)
1013     --           xst-params-split    4     Split
1014     --           xst-param-read      5     Transfer on Reading
1015     --           xst-param-write     6     Transfer on Writing
1016
1017     TraceStatics    (me; use : Integer; mode : Integer = 0);
1018     ---Purpose : Traces the Statics attached to a given use number
1019     --           If <use> is given positive (normal), the trace is embedded
1020     --           with a header and a trailer
1021     --           If <use> is negative, just values are printed
1022     --             (this allows to make compositions)
1023     --           Remark : use number  5 commands use -2 to be traced
1024     --           Remark : use numbers 4 and 6 command use -3 to be traced
1025
1026     DumpShare (me);
1027     ---Purpose : Dumps contents of the ShareOut (on "cout")
1028
1029     ListItems (me; label : CString = "");
1030     ---Purpose : Lists the Labels of all Items of the WorkSession
1031     --           If <label> is defined, lists labels which contain it
1032
1033     ListFinalModifiers (me; formodel : Boolean);
1034     ---Purpose : Lists the Modifiers of the session (for each one, displays
1035     --           its Label). Listing is done following Ranks (Modifiers are
1036     --           invoked following their ranks)
1037     --           Model Modifiers if <formodel> is True, File Modifiers else
1038
1039     DumpSelection (me; sel : Selection);
1040     ---Purpose : Lists a Selection and its Sources (see SelectionIterator),
1041     --           given its rank in the list
1042
1043     DumpModel (me : mutable; level : Integer; S : Messenger from Message);
1044     ---Purpose : Lists the content of the Input Model (if there is one)
1045     --           According level : 0 -> gives only count of Entities and Roots
1046     --           1 -> Lists also Roots;  2 -> Lists all Entities (by TraceType)
1047     --           3 -> Performs a call to CheckList (Fails) and lists the result
1048     --           4 -> as 3 but all CheckList (Fails + Warnings)
1049     --           5,6,7  : as 3 but resp. Count,List,Labels by Fail
1050     --           8,9,10 : as 4 but resp. Count,List,Labels by message
1051
1052     TraceDumpModel (me : mutable; mode : Integer);
1053     ---Purpose : Dumps the current Model (as inherited DumpModel), on currently
1054     --           defined Default Trace File (default is standard output)
1055
1056     DumpEntity (me; ent : Transient; level : Integer; S : Messenger from Message);
1057     ---Purpose : Dumps a starting entity according to the current norm.
1058     --           To do this, it calls DumpEntity from WorkLibrary.
1059     --           <level> is to be interpreted for each norm : see specific
1060     --           classes of WorkLibrary for it. Generally, 0 if for very basic
1061     --           (only type ...), greater values give more and more details.
1062
1063     PrintEntityStatus (me : mutable; ent : Transient; S : Messenger from Message);
1064     ---Purpose : Prints main informations about an entity : its number, type,
1065     --           validity (and checks if any), category, shareds and sharings..
1066     --           mutable because it can recompute checks as necessary
1067
1068     TraceDumpEntity (me; ent : Transient; level : Integer);
1069     ---Purpose : Dumps an entity from the current Model as inherited DumpEntity
1070     --           on currently defined Default Trace File
1071     --           (<level> interpreted according to the Norm, see WorkLibrary)
1072
1073     PrintCheckList (me; checklist : CheckIterator;
1074                     failsonly : Boolean; mode : PrintCount);
1075     ---Purpose : Prints a CheckIterator to the current Trace File, controlled
1076     --           with the current Model
1077     --           complete or fails only, according to <failsonly>
1078     --           <mode> defines the mode of printing
1079     --           0 : sequential, according entities; else with a CheckCounter
1080     --           1 : according messages, count of entities
1081     --           2 : id but with list of entities, designated by their numbers
1082     --           3 : as 2 but with labels of entities
1083
1084     PrintSignatureList (me; signlist : SignatureList; mode : PrintCount);
1085     ---Purpose : Prints a SignatureList to the current Trace File, controlled
1086     --           with the current Model
1087     --           <mode> defines the mode of printing (see SignatureList)
1088
1089
1090     EvaluateSelection (me; sel : Selection);
1091     ---Purpose : Displays the list of Entities selected by a Selection (i.e.
1092     --           the result of EvalSelection).
1093
1094     EvaluateDispatch (me; disp : Dispatch; mode : Integer = 0);
1095     ---Purpose : Displays the result of applying a Dispatch on the input Model
1096     --           (also shows Remainder if there is)
1097     --           <mode> = 0 (default), displays nothing else
1098     --           <mode> = 1 : displays also duplicated entities (because of
1099     --              this dispatch)
1100     --           <mode> = 2 : displays the entities of the starting Model
1101     --              which are not taken by this dispatch (forgotten entities)
1102     --           <mode> = 3 : displays both duplicated and forgotten entities
1103     --           Remark : EvaluateComplete displays these data evaluated for
1104     --           for all the dispatches, if there are several
1105
1106     EvaluateComplete (me; mode : Integer = 0);
1107     ---Purpose : Displays the effect of applying the ShareOut on the input
1108     --           Model.
1109     --           <mode> = 0 (default) : displays only roots for each packet,
1110     --           <mode> = 1 : displays all entities for each packet, plus
1111     --             duplicated entities
1112     --           <mode> = 2 : same as <mode> = 1, plus displays forgotten
1113     --             entities (which are in no packet at all)
1114
1115     ListEntities (me; iter : EntityIterator; mode : Integer);
1116     ---Purpose : Internal method which displays an EntityIterator
1117     --           <mode> 0 gives short display (only entity numbers)
1118     --           1 gives a more complete trace (1 line per Entity)
1119     --           (can be used each time a trace has to be output from a list)
1120     --           2 gives a form suitable for givelist : (n1,n2,n3...)
1121
1122 fields
1123
1124     theerrhand   : Boolean;
1125     theshareout  : ShareOut;
1126
1127     thelibrary   : WorkLibrary;
1128     theprotocol  : Protocol from Interface;
1129     themodel     : InterfaceModel;
1130     thegraph     : HGraph     is protected;
1131     theloaded    : AsciiString;
1132     thegtool     : GTool from Interface;
1133
1134     thecheckdone : Boolean;
1135     thechecklist : CheckIterator;
1136     thecheckrun  : CheckIterator  is protected;  -- (LastRunCheckList)
1137     thecheckana  : AsciiString;
1138
1139     theitems     : IndexedDataMapOfTransientTransient  is protected;
1140     thenames     : DictionaryOfTransient    is protected;
1141
1142     thecopier    : ModelCopier;    -- produces + memorizes transferred data
1143     theoldel     : InterfaceModel;
1144
1145 end WorkSession;