0025266: Debug statements in the source are getting flushed on to the console
[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
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class AppliedModifiers from IFSelect inherits TShared
18
19 ---Purpose : This class allows to memorize and access to the modifiers
20 -- which are to be applied to a file. To each modifier, is bound
21 -- a list of integers (optionnal) : if this list is absent, the
22 -- modifier applies to all the file. Else, it applies to the
23 -- entities designated by these numbers in the produced file.
24 --
25 -- To record a modifier, and a possible list of entity numbers
26 -- to be applied on :
27 -- AddModif (amodifier);
28 -- loop on AddNum (anumber);
29 --
30 -- To query it, Count gives the count of recorded modifiers,
31 -- then for each one :
32 -- Item (numodif, amodifier, entcount);
33 -- IsForAll () -> can be called, if True, applies on the whole file
34 --
35 -- for (i = 1; i <= entcount; i ++)
36 -- nument = ItemNum (i); -> return an entity number
37
38uses GeneralModifier, SequenceOfGeneralModifier,
39 HSequenceOfInteger from TColStd, IntList
40
41is
42
6e33d3ce 43 Create (nbmax,nbent : Integer) returns AppliedModifiers;
7fd59977 44 ---Purpose : Creates an AppliedModifiers, ready to record up to <nbmax>
45 -- modifiers, on a model of <nbent> entities
46
6e33d3ce 47 AddModif (me : mutable; modif : GeneralModifier) returns Boolean;
7fd59977 48 ---Purpose : Records a modifier. By default, it is to apply on all a
49 -- produced file. Further calls to AddNum will restrict this.
50 -- Returns True if done, False if too many modifiers are already
51 -- recorded
52
53 AddNum (me : mutable; nument : Integer) returns Boolean;
54 ---Purpose : Adds a number of entity of the output file to be applied on.
55 -- If a sequence of AddNum is called after AddModif, this
56 -- Modifier will be applied on the list of designated entities.
57 -- Else, it will be applied on all the file
58 -- Returns True if done, False if no modifier has yet been added
59
60 Count (me) returns Integer;
61 ---Purpose : Returns the count of recorded modifiers
62
63 Item (me : mutable; num : Integer;
6e33d3ce 64 modif : out GeneralModifier; entcount : out Integer)
7fd59977 65 returns Boolean;
66 ---Purpose : Returns the description for applied modifier n0 <num> :
67 -- the modifier itself, and the count of entities to be applied
68 -- on. If no specific list of number has been defined, returns
69 -- the total count of entities of the file
70 -- If this count is zero, then the modifier applies to all
71 -- the file (see below). Else, the numbers are then queried by
72 -- calls to ItemNum between 1 and <entcount>
73 -- Returns True if OK, False if <num> is out of range
74
75 ItemNum (me; nument : Integer) returns Integer;
76 ---Purpose : Returns a numero of entity to be applied on, given its rank
77 -- in the list. If no list is defined (i.e. for all the file),
78 -- returns <nument> itself, to give all the entities of the file
79 -- Returns 0 if <nument> out of range
80
81 ItemList (me) returns HSequenceOfInteger;
82 ---Purpose : Returns the list of entities to be applied on (see Item)
83 -- as a HSequence (IsForAll produces the complete list of all
84 -- the entity numbers of the file
85
86 IsForAll (me) returns Boolean;
87 ---Purpose : Returns True if the applied modifier queried by last call to
88 -- Item is to be applied to all the produced file.
89 -- Else, <entcount> returned by Item gives the count of entity
90 -- numbers, each one is queried by ItemNum
91
92fields
93
94 themodifs : SequenceOfGeneralModifier;
95 thelists : IntList;
96 thenbent : Integer;
97 theentcnt : Integer;
98
99end AppliedModifiers;