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