2 -- Created: Tue Nov 17 12:05:52 1992
3 -- Author: Christian CAILLET
5 ---Copyright: Matra Datavision 1992
8 deferred class Selection from IFSelect inherits TShared
10 ---Purpose : A Selection allows to define a set of Interface Entities.
11 -- Entities to be put on an output file should be identified in
12 -- a way as independant from such or such execution as possible.
13 -- This permits to handle comprehensive criteria, and to replay
14 -- them when a new variant of an input file has to be processed.
16 -- Its input can be, either an Interface Model (the very source),
17 -- or another-other Selection(s) or any other ouput. All list
18 -- computations start from an input Graph (from IFGraph)
20 uses AsciiString from TCollection, EntityIterator, Graph, SelectionIterator
26 RootResult (me; G : Graph) returns EntityIterator
27 raises InterfaceError is deferred;
28 ---Purpose : Returns the list of selected entities, computed from Input
29 -- given as a Graph. Specific to each class of Selection
30 -- Note that uniqueness of each entity is not required here
31 -- This method can raise an exception as necessary
33 HasUniqueResult (me) returns Boolean is virtual protected;
34 ---Purpose : Returns True if RootResult guarantees uniqueness for each
35 -- Entity. Called by UniqueResult.
36 -- Default answer is False. Can be redefined.
38 UniqueResult (me; G : Graph) returns EntityIterator;
39 ---Purpose : Returns the list of selected entities, each of them beeing
40 -- unique. Default definition works from RootResult. According
41 -- HasUniqueResult, UniqueResult returns directly RootResult,
42 -- or build a Unique Result from it with a Graph.
44 CompleteResult (me; G : Graph) returns EntityIterator is virtual;
45 ---Purpose : Returns the list of entities involved by a Selection, i.e.
46 -- UniqueResult plus the shared entities (directly or not)
49 FillIterator (me; iter : in out SelectionIterator) is deferred;
50 ---Purpose : Puts in an Iterator the Selections from which "me" depends
51 -- (there can be zero, or one, or a list).
52 -- Specific to each class of Selection
54 Label (me) returns AsciiString from TCollection is deferred;
55 ---Purpose : Returns a text which defines the criterium applied by a
56 -- Selection (can be used to be printed, displayed ...)
57 -- Specific to each class