Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IFSelect / IFSelect_SelectExtract.cdl
1 -- File:        SelectExtract.cdl
2 -- Created:     Tue Nov 17 19:19:26 1992
3 -- Author:      Christian CAILLET
4 --              <cky@topsn2>
5 ---Copyright:    Matra Datavision 1992
6
7
8 deferred class SelectExtract  from IFSelect  inherits SelectDeduct
9
10     ---Purpose : A SelectExtract determines a list of Entities from an Input
11     --           Selection, as a sub-list of the Input Result
12     --           It works by applying a sort criterium on each Entity of the
13     --           Input. This criterium can be applied Direct to Pick Items
14     --           (default case) or Reverse to Remove Item
15     --           
16     --           Basic features (the unique Input) are inherited from SelectDeduct
17
18 uses AsciiString from TCollection, InterfaceModel, EntityIterator,  Graph
19
20 is
21
22     Initialize;
23     ---Purpose : Initializes a SelectExtract : enforces the sort to be Direct
24
25     IsDirect (me) returns Boolean;
26     ---Purpose : Returns True if Sort criterium is Direct, False if Reverse
27
28     SetDirect (me : mutable; direct : Boolean);
29     ---Purpose : Sets Sort criterium sense to a new value
30     --           (True : Direct , False : Reverse)
31
32         -- Input : see SelectDeduct
33
34
35     RootResult (me; G : Graph) returns EntityIterator is virtual;
36     ---Purpose : Returns the list of selected entities. Works by calling the
37     --           method Sort on each input Entity : the Entity is kept as
38     --           output if Sort returns the same value as Direct status
39
40     Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
41         returns Boolean  is deferred;
42     ---Purpose : Returns True for an Entity if it satisfies the Sort criterium
43     --           It receives :
44     --           - <rank>, the rank of the Entity in the Iteration,
45     --           - <ent> , the Entity itself, and
46     --           - <model>, the Starting Model
47     --             Hence, the Entity to check is "model->Value(num)" (but an
48     --             InterfaceModel allows other checks)
49     --           This method is specific to each class of SelectExtract
50
51     SortInGraph (me; rank : Integer; ent : Transient; G : Graph)
52         returns Boolean  is virtual;
53     ---Purpose : Works as Sort but works on the Graph
54     --           Default directly calls Sort, but it can be redefined
55     --           If SortInGraph is redefined, Sort should be defined even if
56     --           not called (to avoid deferred methods in a final class)
57
58
59     Label (me) returns AsciiString from TCollection;
60     ---Purpose : Returns a text saying "Picked" or "Removed", plus the
61     --           specific criterium returned by ExtractLabel (see below)
62
63     ExtractLabel (me) returns AsciiString from TCollection  is deferred;
64     ---Purpose : Returns a text defining the criterium for extraction
65
66 fields
67
68     thesort : Boolean;
69
70 end SelectExtract;