b311480e |
1 | -- Created on: 1994-08-25 |
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 | |
17 | class ChangeLevelList from IGESSelect inherits ModelModifier from IGESSelect |
18 | |
19 | ---Purpose : Changes Level List (in directory part) to a new single value |
20 | -- Only entities attached to a LevelListEntity are considered |
21 | -- If OldNumber is defined, only entities whose LevelList |
22 | -- contains its Value are processed. Else all LevelLists are. |
23 | -- |
24 | -- Remark : this concerns the Directory Part only. The Level List |
25 | -- Entities themselves (their content) are not affected. |
26 | -- |
27 | -- If NewNumber is defined (positive or zero), it gives the new |
28 | -- value for Level Number. Else, the first value of the LevelList |
29 | -- is set as new LevelNumber |
30 | |
31 | uses AsciiString from TCollection, |
32 | IGESModel, CopyTool, ContextModif, IntParam |
33 | |
34 | is |
35 | |
6e33d3ce |
36 | Create returns ChangeLevelList; |
7fd59977 |
37 | ---Purpose : Creates a ChangeLevelList, not yet defined |
38 | -- (see SetOldNumber and SetNewNumber) |
39 | |
40 | HasOldNumber (me) returns Boolean; |
41 | ---Purpose : Returns True if OldNumber is defined : then, only entities |
42 | -- which have a LevelList which contains the value are processed. |
43 | -- Else, all entities attached to a LevelList are. |
44 | |
6e33d3ce |
45 | OldNumber (me) returns IntParam; |
7fd59977 |
46 | ---Purpose : Returns the parameter for OldNumber. If not defined (Null |
47 | -- Handle), it will be interpreted as "all level lists" |
48 | |
6e33d3ce |
49 | SetOldNumber (me : mutable; param : IntParam); |
7fd59977 |
50 | ---Purpose : Sets a parameter for OldNumber |
51 | |
52 | HasNewNumber (me) returns Boolean; |
53 | ---Purpose : Returns True if NewNumber is defined : then, it gives the new |
54 | -- value for Level Number. Else, the first value of the LevelList |
55 | -- is used as new Level Number. |
56 | |
6e33d3ce |
57 | NewNumber (me) returns IntParam; |
7fd59977 |
58 | ---Purpose : Returns the parameter for NewNumber. If not defined (Null |
59 | -- Handle), it will be interpreted as "new value 0" |
60 | |
6e33d3ce |
61 | SetNewNumber (me : mutable; param : IntParam); |
7fd59977 |
62 | ---Purpose : Sets a parameter for NewNumber |
63 | |
64 | |
65 | Performing (me; ctx : in out ContextModif; |
6e33d3ce |
66 | target : IGESModel; |
7fd59977 |
67 | TC : in out CopyTool); |
68 | ---Purpose : Specific action : considers selected target entities : |
69 | -- If OldNumber is not defined, all entities attached to a |
70 | -- Level List |
71 | -- If OldNumber is defined (value not negative), entities with a |
72 | -- Level List which contains this value |
73 | -- Attaches all these entities to value given by NewNumber, or |
74 | -- the first value of the Level List |
75 | |
76 | Label (me) returns AsciiString from TCollection; |
77 | ---Purpose : Returns a text which begins by |
78 | -- "Changes Level Lists containing <old>", or |
79 | -- "Changes all Level Lists in D.E.", and ends by |
80 | -- " to Number <new>" or " to Number = first value in List" |
81 | |
82 | fields |
83 | |
84 | theold : IntParam; |
85 | thenew : IntParam; |
86 | |
87 | end ChangeLevelList; |