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 class SelectionIterator from IFSelect
19 ---Purpose : Defines an Iterator on a list of Selections
21 uses Selection, HSeqOfSelection, TSeqOfSelection
27 Create returns SelectionIterator;
28 ---Purpose : Creates an empty iterator, ready to be filled
30 Create (sel : Selection) returns SelectionIterator;
31 ---Purpose : Creates an iterator from a Selection : it lists the Selections
32 -- from which <sel> depends (given by its method FillIterator)
34 AddFromIter (me : in out; iter : in out SelectionIterator) is static;
35 ---Purpose : Adds to an iterator the content of another one
36 -- (each selection is present only once in the result)
38 AddItem (me : in out; sel : any Selection) is static;
39 ---Purpose : Adds a Selection to an iterator (if not yet noted)
41 AddList (me : in out; list : TSeqOfSelection) is static;
42 ---Purpose : Adds a list of Selections to an iterator (this list comes
43 -- from the description of a Selection or a Dispatch, etc...)
46 More (me) returns Boolean is static;
47 ---Purpose : Returns True if there are more Selections to get
49 Next (me : in out) is static;
50 ---Purpose : Sets iterator to the next item
52 Value (me) returns any Selection raises NoSuchObject is static;
53 ---Purpose : Returns the current Selction beeing iterated
54 -- Error if count of Selection has been passed
55 ---C++ : return const &
60 thelist : HSeqOfSelection;
62 end SelectionIterator;