7fd59977 |
1 | -- File: SelectionIterator.cdl |
2 | -- Created: Tue Nov 17 15:18:39 1992 |
3 | -- Author: Christian CAILLET |
4 | -- <cky@topsn2> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | |
8 | class SelectionIterator from IFSelect |
9 | |
10 | ---Purpose : Defines an Iterator on a list of Selections |
11 | |
12 | uses Selection, HSeqOfSelection, TSeqOfSelection |
13 | |
14 | raises NoSuchObject |
15 | |
16 | is |
17 | |
18 | Create returns SelectionIterator; |
19 | ---Purpose : Creates an empty iterator, ready to be filled |
20 | |
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) |
24 | |
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) |
28 | |
29 | AddItem (me : in out; sel : any Selection) is static; |
30 | ---Purpose : Adds a Selection to an iterator (if not yet noted) |
31 | |
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...) |
35 | |
36 | |
37 | More (me) returns Boolean is static; |
38 | ---Purpose : Returns True if there are more Selections to get |
39 | |
40 | Next (me : in out) is static; |
41 | ---Purpose : Sets iterator to the next item |
42 | |
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 & |
47 | |
48 | fields |
49 | |
50 | thecurr : Integer; |
51 | thelist : HSeqOfSelection; |
52 | |
53 | end SelectionIterator; |