1 -- Created on: 1992-11-17
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class SelectCombine from IFSelect inherits Selection
19 ---Purpose : A SelectCombine type Selection defines algebraic operations
20 -- between results of several Selections
21 -- It is a deferred class : sub-classes will have to define
22 -- precise what operator is to be applied
24 uses AsciiString from TCollection, EntityIterator,
25 Graph, SelectionIterator, TSeqOfSelection
30 ---Purpose : Defines an empty SelectCombine
32 NbInputs (me) returns Integer;
33 ---Purpose : Returns the count of Input Selections
35 Input (me; num : Integer) returns Selection;
36 ---Purpose : Returns an Input Selection, given its rank in the list
38 InputRank (me; sel : Selection) returns Integer;
39 ---Purpose : Returns the rank of an input Selection, 0 if not in the list.
40 -- Most generally, its value is meaningless, except for testing
41 -- the presence of an input Selection :
42 -- - == 0 if <sel> is not an input for <me>
43 -- - > 0 if <sel> is an input for <me>
45 Add (me : mutable; sel : Selection; atnum : Integer = 0);
46 ---Purpose : Adds a Selection to the filling list
47 -- By default, adds it to the end of the list
48 -- A Positive rank less then NbInputs gives an insertion rank
49 -- (InsertBefore : the new <atnum>th item of the list is <sel>)
51 Remove (me : mutable; sel : Selection) returns Boolean;
52 ---Purpose : Removes an input Selection.
53 -- Returns True if Done, False, if <sel> is not an input for <me>
55 Remove (me : mutable; num : Integer) returns Boolean;
56 ---Purpose : Removes an input Selection, given its rank in the list
57 -- Returns True if Done, False if <num> is out of range
60 HasUniqueResult (me) returns Boolean is redefined protected;
61 ---Purpose : Returns always True, because RootResult gives a Unique list
64 FillIterator (me; iter : in out SelectionIterator);
65 ---Purpose : Puts in an Iterator the Selections from which "me" depends
66 -- That is to say, the list of Input Selections
70 thelist : TSeqOfSelection;