1 -- File: SelectionIterator.cdl
2 -- Created: Tue Nov 17 15:18:39 1992
3 -- Author: Christian CAILLET
5 ---Copyright: Matra Datavision 1992
8 class SelectionIterator from IFSelect
10 ---Purpose : Defines an Iterator on a list of Selections
12 uses Selection, HSeqOfSelection, TSeqOfSelection
18 Create returns SelectionIterator;
19 ---Purpose : Creates an empty iterator, ready to be filled
21 Create (sel : Selection) returns SelectionIterator;
22 ---Purpose : Creates an iterator from a Selection : it lists the Selections
23 -- from which <sel> depends (given by its method FillIterator)
25 AddFromIter (me : in out; iter : in out SelectionIterator) is static;
26 ---Purpose : Adds to an iterator the content of another one
27 -- (each selection is present only once in the result)
29 AddItem (me : in out; sel : any Selection) is static;
30 ---Purpose : Adds a Selection to an iterator (if not yet noted)
32 AddList (me : in out; list : TSeqOfSelection) is static;
33 ---Purpose : Adds a list of Selections to an iterator (this list comes
34 -- from the description of a Selection or a Dispatch, etc...)
37 More (me) returns Boolean is static;
38 ---Purpose : Returns True if there are more Selections to get
40 Next (me : in out) is static;
41 ---Purpose : Sets iterator to the next item
43 Value (me) returns any Selection raises NoSuchObject is static;
44 ---Purpose : Returns the current Selction beeing iterated
45 -- Error if count of Selection has been passed
46 ---C++ : return const &
51 thelist : HSeqOfSelection;
53 end SelectionIterator;