0022627: Change OCCT memory management defaults
[occt.git] / src / IFSelect / IFSelect_AppliedModifiers.cdl
1 -- File:        IFSelect_AppliedModifiers.cdl
2 -- Created:     Mon May  2 18:34:11 1994
3 -- Author:      Christian CAILLET
4 --              <cky@bravox>
5 ---Copyright:    Matra Datavision 1994
6
7
8 class AppliedModifiers  from IFSelect  inherits TShared
9
10     ---Purpose : This class allows to memorize and access to the modifiers
11     --           which are to be applied to a file. To each modifier, is bound
12     --           a list of integers (optionnal) : if this list is absent, the
13     --           modifier applies to all the file. Else, it applies to the
14     --           entities designated by these numbers in the produced file.
15     --           
16     --           To record a modifier, and a possible list of entity numbers
17     --           to be applied on :
18     --             AddModif (amodifier);
19     --             loop on  AddNum (anumber);
20     --           
21     --           To query it,  Count gives the count of recorded modifiers,
22     --           then for each one :
23     --             Item (numodif, amodifier, entcount);
24     --             IsForAll ()  -> can be called, if True, applies on the whole file
25     --             
26     --             for (i = 1; i <= entcount; i ++)
27     --               nument = ItemNum (i);  -> return an entity number
28
29 uses  GeneralModifier, SequenceOfGeneralModifier,
30       HSequenceOfInteger from TColStd, IntList
31
32 is
33
34     Create (nbmax,nbent : Integer) returns mutable AppliedModifiers;
35     ---Purpose : Creates an AppliedModifiers, ready to record up to <nbmax>
36     --           modifiers, on a model of <nbent> entities
37
38     AddModif (me : mutable; modif : mutable GeneralModifier) returns Boolean;
39     ---Purpose : Records a modifier. By default, it is to apply on all a
40     --           produced file. Further calls to AddNum will restrict this.
41     --           Returns True if done, False if too many modifiers are already
42     --           recorded
43
44     AddNum (me : mutable; nument : Integer) returns Boolean;
45     ---Purpose : Adds a number of entity of the output file to be applied on.
46     --           If a sequence of AddNum is called after AddModif, this
47     --           Modifier will be applied on the list of designated entities.
48     --           Else, it will be applied on all the file
49     --           Returns True if done, False if no modifier has yet been added
50
51     Count (me) returns Integer;
52     ---Purpose : Returns the count of recorded modifiers
53
54     Item (me : mutable; num : Integer;
55           modif : out mutable GeneralModifier; entcount : out Integer)
56             returns Boolean;
57     ---Purpose : Returns the description for applied modifier n0 <num> :
58     --           the modifier itself, and the count of entities to be applied
59     --           on. If no specific list of number has been defined, returns
60     --           the total count of entities of the file
61     --           If this count is zero, then the modifier applies to all
62     --           the file (see below). Else, the numbers are then queried by
63     --           calls to ItemNum between 1 and <entcount>
64     --           Returns True if OK, False if <num> is out of range
65
66     ItemNum (me; nument : Integer) returns Integer;
67     ---Purpose : Returns a numero of entity to be applied on, given its rank
68     --           in the list. If no list is defined (i.e. for all the file),
69     --           returns <nument> itself, to give all the entities of the file
70     --           Returns 0 if <nument> out of range
71
72     ItemList (me) returns HSequenceOfInteger;
73     ---Purpose : Returns the list of entities to be applied on (see Item)
74     --           as a HSequence (IsForAll produces the complete list of all
75     --           the entity numbers of the file
76
77     IsForAll (me) returns Boolean;
78     ---Purpose : Returns True if the applied modifier queried by last call to
79     --           Item is to be applied to all the produced file.
80     --           Else, <entcount> returned by Item gives the count of entity
81     --           numbers, each one is queried by ItemNum
82
83 fields
84
85     themodifs : SequenceOfGeneralModifier;
86     thelists  : IntList;
87     thenbent  : Integer;
88     theentcnt : Integer;
89
90 end AppliedModifiers;