0024814: Avoid using explicit names of Handle classes
[occt.git] / src / IFSelect / IFSelect_GeneralModifier.cdl
1 -- Created on: 1993-10-19
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class GeneralModifier  from IFSelect  inherits TShared
18
19     ---Purpose : This class gives a frame for Actions which modify the effect
20     --           of a Dispatch, i.e. :
21     --           By Selections and Dispatches, an original Model can be
22     --           splitted into one or more "target" Models : these Models
23     --           contain Entities copied from the original one (that is, a
24     --           part of it). Basically, these dispatched Entities are copied
25     --           as identical to their original counterparts. Also the copied
26     --           Models reproduce the Header of the original one.
27     --           
28     --           Modifiers allow to change this copied content : this is the
29     --           way to be used for any kind of alterations, adaptations ...
30     --           They are exploited by a ModelCopier, which firstly performs
31     --           the copy operation described by Dispatches, then invokes the
32     --           Modifiers to work on the result.
33     --           
34     --           Each GeneralModifier can be attached to :
35     --           - all the Models produced
36     --           - a Dispatch (it will be applied to all the Models obtained
37     --             from this Dispatch) designated by its Ident in a ShareOut
38     --           - in addition, to a Selection (facultative) : this adds a
39     --             criterium, the Modifier is invoked on a produced Model only
40     --             if this Model contains an Entity copied from one of the
41     --             Entities designated by this Selection.
42     --             (for special Modifiers from IFAdapt, while they must work on
43     --             definite Entities, this Selection is mandatory to run)
44     --             
45     --             Remark : this class has no action attached, it only provides
46     --             a frame to work on criteria. Then, sub-classes will define
47     --             their kind of action, which can be applied at a precise step
48     --             of the production of a File : see Modifier, and in the
49     --             package IFAdapt, EntityModifier and EntityCopier
50
51
52 uses AsciiString from TCollection, Selection, Dispatch
53
54 is
55
56     Initialize (maychangegraph : Boolean);
57     ---Purpose : Sets the Modifier criteria to default Values
58     --           (i.e. "always applies")
59     --           <maychangegraph> must be provided at creation time, to :
60     --           - False if this GeneralModifier surely lets the graph of
61     --             dependencies unchanged (NO edition of any reference, BUT
62     --             also NO entity added or replaced or removed)
63     --           - True if there is a possibility of changing the graph of
64     --             dependencies when this modifier is applied
65
66     MayChangeGraph (me) returns Boolean;
67     ---Purpose : Returns True if this modifier may change the graph of
68     --           dependences (aknowledged at creation time)
69
70     SetDispatch (me : mutable; disp : any Dispatch);
71     ---Purpose : Attaches to a Dispatch. If <disp> is Null, Resets it
72     --           (to apply the Modifier on every Dispatch)
73
74     Dispatch (me) returns any Dispatch;
75     ---Purpose : Returns the Dispatch to be matched, Null if not set
76
77     Applies (me; disp : Dispatch) returns Boolean;
78     ---Purpose : Returns True if a Model obtained from the Dispatch <disp>
79     --           is to be treated (apart from the Selection criterium)
80     --           If Dispatch(me) is Null, returns True. Else, checks <disp>
81
82
83     SetSelection (me : mutable; sel : mutable Selection);
84     ---Purpose : Sets a Selection : a Model is treated if it contains one or
85     --           more Entities designated by the Selection
86
87     ResetSelection (me : mutable);
88     ---Purpose : Resets the Selection : this criterium is not longer active
89
90     HasSelection (me) returns Boolean;
91     ---Purpose : Returns True if a Selection is set as an additionnal criterium
92
93     Selection (me) returns mutable Selection;
94     ---Purpose : Returns the Selection, or a Null Handle if not set
95
96
97     Label (me) returns AsciiString from TCollection  is deferred;
98     ---Purpose : Returns a short text which defines the operation performed
99
100 fields
101
102     thesel  : Selection;
103     thedisp : Dispatch;
104     thechgr : Boolean;
105
106 end GeneralModifier;