0024157: Parallelization of assembly part of BO
[occt.git] / src / IFSelect / IFSelect_AppliedModifiers.cdl
CommitLineData
b311480e 1-- Created on: 1994-05-02
2-- Created by: Christian CAILLET
3-- Copyright (c) 1994-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23class AppliedModifiers from IFSelect inherits TShared
24
25 ---Purpose : This class allows to memorize and access to the modifiers
26 -- which are to be applied to a file. To each modifier, is bound
27 -- a list of integers (optionnal) : if this list is absent, the
28 -- modifier applies to all the file. Else, it applies to the
29 -- entities designated by these numbers in the produced file.
30 --
31 -- To record a modifier, and a possible list of entity numbers
32 -- to be applied on :
33 -- AddModif (amodifier);
34 -- loop on AddNum (anumber);
35 --
36 -- To query it, Count gives the count of recorded modifiers,
37 -- then for each one :
38 -- Item (numodif, amodifier, entcount);
39 -- IsForAll () -> can be called, if True, applies on the whole file
40 --
41 -- for (i = 1; i <= entcount; i ++)
42 -- nument = ItemNum (i); -> return an entity number
43
44uses GeneralModifier, SequenceOfGeneralModifier,
45 HSequenceOfInteger from TColStd, IntList
46
47is
48
49 Create (nbmax,nbent : Integer) returns mutable AppliedModifiers;
50 ---Purpose : Creates an AppliedModifiers, ready to record up to <nbmax>
51 -- modifiers, on a model of <nbent> entities
52
53 AddModif (me : mutable; modif : mutable GeneralModifier) returns Boolean;
54 ---Purpose : Records a modifier. By default, it is to apply on all a
55 -- produced file. Further calls to AddNum will restrict this.
56 -- Returns True if done, False if too many modifiers are already
57 -- recorded
58
59 AddNum (me : mutable; nument : Integer) returns Boolean;
60 ---Purpose : Adds a number of entity of the output file to be applied on.
61 -- If a sequence of AddNum is called after AddModif, this
62 -- Modifier will be applied on the list of designated entities.
63 -- Else, it will be applied on all the file
64 -- Returns True if done, False if no modifier has yet been added
65
66 Count (me) returns Integer;
67 ---Purpose : Returns the count of recorded modifiers
68
69 Item (me : mutable; num : Integer;
70 modif : out mutable GeneralModifier; entcount : out Integer)
71 returns Boolean;
72 ---Purpose : Returns the description for applied modifier n0 <num> :
73 -- the modifier itself, and the count of entities to be applied
74 -- on. If no specific list of number has been defined, returns
75 -- the total count of entities of the file
76 -- If this count is zero, then the modifier applies to all
77 -- the file (see below). Else, the numbers are then queried by
78 -- calls to ItemNum between 1 and <entcount>
79 -- Returns True if OK, False if <num> is out of range
80
81 ItemNum (me; nument : Integer) returns Integer;
82 ---Purpose : Returns a numero of entity to be applied on, given its rank
83 -- in the list. If no list is defined (i.e. for all the file),
84 -- returns <nument> itself, to give all the entities of the file
85 -- Returns 0 if <nument> out of range
86
87 ItemList (me) returns HSequenceOfInteger;
88 ---Purpose : Returns the list of entities to be applied on (see Item)
89 -- as a HSequence (IsForAll produces the complete list of all
90 -- the entity numbers of the file
91
92 IsForAll (me) returns Boolean;
93 ---Purpose : Returns True if the applied modifier queried by last call to
94 -- Item is to be applied to all the produced file.
95 -- Else, <entcount> returned by Item gives the count of entity
96 -- numbers, each one is queried by ItemNum
97
98fields
99
100 themodifs : SequenceOfGeneralModifier;
101 thelists : IntList;
102 thenbent : Integer;
103 theentcnt : Integer;
104
105end AppliedModifiers;