7fd59977 |
1 | -- File: IFSelect_SelectInList.cdl |
2 | -- Created: Thu Jan 7 16:45:30 1993 |
3 | -- Author: Christian CAILLET |
4 | -- <cky@sdsun1> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | deferred class SelectInList from IFSelect inherits SelectAnyList |
9 | |
10 | ---Purpose : A SelectInList kind Selection selects a List of an Entity, |
11 | -- which is composed of single Entities |
12 | -- To know the list on which to work, SelectInList has two |
13 | -- deferred methods : NbItems (inherited from SelectAnyList) and |
14 | -- ListedEntity (which gives an item as an Entity) which must be |
15 | -- defined to get a List in an Entity of the required Type (and |
16 | -- consider that list is empty if Entity has not required Type) |
17 | -- |
18 | -- As for SelectAnyList, if a type of Entity defines several |
19 | -- lists, a given sub-class of SelectInList is attached on one |
20 | |
21 | uses AsciiString from TCollection, Transient, EntityIterator, Graph, IntParam |
22 | |
23 | raises OutOfRange |
24 | |
25 | is |
26 | |
27 | -- NbItems (me; ent : Transient) returns Integer is deferred; |
28 | -- KeepInputEntity (me; iter : in out EntityIterator) is deferred; |
29 | -- these method are inherited as deferred and remain to be defined |
30 | |
31 | ListedEntity (me; num : Integer; ent : Transient) |
32 | returns Transient raises OutOfRange is deferred; |
33 | ---Purpose : Returns an Entity, given its rank in the list |
34 | |
35 | FillResult (me; n1,n2 : Integer; ent : Transient; |
36 | result : in out EntityIterator); |
37 | ---Purpose : Puts into the result, the sub-entities of the list, from n1 to |
38 | -- n2 included. Remark that adequation with Entity's type and |
39 | -- length of list has already been made at this stage |
40 | -- Called by RootResult; calls ListedEntity (see below) |
41 | |
42 | end SelectInList; |