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
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.
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.
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.
23 deferred class SelectDeduct from IFSelect inherits Selection
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)
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
38 uses AsciiString from TCollection, EntityIterator, Graph,
39 SelectionIterator, SelectPointed
45 SetInput (me : mutable; sel : mutable Selection);
46 ---Purpose : Defines or Changes the Input Selection
48 Input (me) returns mutable Selection;
49 ---Purpose : Returns the Input Selection
51 HasInput (me) returns Boolean;
52 ---Purpose : Returns True if the Input Selection is defined, False else
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
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
64 -- It is exploited by InputResult
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.
71 -- If Alternate is set, InputResult takes its definition instead
72 -- of calling the Input Selection, then clears it
74 -- RootResult remains to be defined by each class of Selection
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
84 thealt : SelectPointed;