b311480e |
1 | -- Created on: 1992-11-17 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1992-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 | deferred class SelectDeduct from IFSelect inherits Selection |
18 | |
19 | ---Purpose : A SelectDeduct determines a list of Entities from an Input |
20 | -- Selection, by a computation : Output list is not obliged to be |
21 | -- a sub-list of Input list |
22 | -- (for more specific, see SelectExtract for filtered sub-lists, |
23 | -- and SelectExplore for recurcive exploration) |
24 | -- |
25 | -- A SelectDeduct may use an alternate input for one shot |
26 | -- This allows to use an already existing definition, by |
27 | -- overloading the input selection by an alternate list, |
28 | -- already defined, for one use : |
29 | -- If this alternate list is set, InputResult queries it instead |
30 | -- of calling the input selection, then clears it immediately |
31 | |
32 | uses AsciiString from TCollection, EntityIterator, Graph, |
33 | SelectionIterator, SelectPointed |
34 | |
35 | raises InterfaceError |
36 | |
37 | is |
38 | |
6e33d3ce |
39 | SetInput (me : mutable; sel : Selection); |
7fd59977 |
40 | ---Purpose : Defines or Changes the Input Selection |
41 | |
6e33d3ce |
42 | Input (me) returns Selection; |
7fd59977 |
43 | ---Purpose : Returns the Input Selection |
44 | |
45 | HasInput (me) returns Boolean; |
46 | ---Purpose : Returns True if the Input Selection is defined, False else |
47 | |
48 | HasAlternate (me) returns Boolean; |
49 | ---Purpose : Tells if an Alternate List has been set, i.e. : the Alternate |
50 | -- Definition is present and set |
51 | |
52 | Alternate (me : mutable) returns SelectPointed; |
53 | ---Purpose : Returns the Alternate Definition |
54 | -- It is returned modifiable, hence an already defined |
55 | -- SelectPointed can be used |
56 | -- But if it was not yet defined, it is created the first time |
57 | -- |
58 | -- It is exploited by InputResult |
59 | ---C++ : return & |
60 | |
61 | InputResult (me; G : Graph) returns EntityIterator; |
62 | ---Purpose : Returns the Result determined by Input Selection, as Unique |
63 | -- if Input Selection is not defined, returns an empty list. |
64 | -- |
65 | -- If Alternate is set, InputResult takes its definition instead |
66 | -- of calling the Input Selection, then clears it |
67 | |
68 | -- RootResult remains to be defined by each class of Selection |
69 | |
70 | |
71 | FillIterator (me; iter : in out SelectionIterator); |
72 | ---Purpose : Puts in an Iterator the Selections from which "me" depends |
73 | -- This list contains one Selection : the InputSelection |
74 | |
75 | fields |
76 | |
77 | thesel : Selection; |
78 | thealt : SelectPointed; |
79 | |
80 | end SelectDeduct; |