0024814: Avoid using explicit names of Handle classes
[occt.git] / src / IFSelect / IFSelect_SelectExtract.cdl
CommitLineData
b311480e 1-- Created on: 1992-11-17
2-- Created by: Christian CAILLET
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class SelectExtract from IFSelect inherits SelectDeduct
18
19 ---Purpose : A SelectExtract determines a list of Entities from an Input
20 -- Selection, as a sub-list of the Input Result
21 -- It works by applying a sort criterium on each Entity of the
22 -- Input. This criterium can be applied Direct to Pick Items
23 -- (default case) or Reverse to Remove Item
24 --
25 -- Basic features (the unique Input) are inherited from SelectDeduct
26
27uses AsciiString from TCollection, InterfaceModel, EntityIterator, Graph
28
29is
30
31 Initialize;
32 ---Purpose : Initializes a SelectExtract : enforces the sort to be Direct
33
34 IsDirect (me) returns Boolean;
35 ---Purpose : Returns True if Sort criterium is Direct, False if Reverse
36
37 SetDirect (me : mutable; direct : Boolean);
38 ---Purpose : Sets Sort criterium sense to a new value
39 -- (True : Direct , False : Reverse)
40
41 -- Input : see SelectDeduct
42
43
44 RootResult (me; G : Graph) returns EntityIterator is virtual;
45 ---Purpose : Returns the list of selected entities. Works by calling the
46 -- method Sort on each input Entity : the Entity is kept as
47 -- output if Sort returns the same value as Direct status
48
49 Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
50 returns Boolean is deferred;
51 ---Purpose : Returns True for an Entity if it satisfies the Sort criterium
52 -- It receives :
53 -- - <rank>, the rank of the Entity in the Iteration,
54 -- - <ent> , the Entity itself, and
55 -- - <model>, the Starting Model
56 -- Hence, the Entity to check is "model->Value(num)" (but an
57 -- InterfaceModel allows other checks)
58 -- This method is specific to each class of SelectExtract
59
60 SortInGraph (me; rank : Integer; ent : Transient; G : Graph)
61 returns Boolean is virtual;
62 ---Purpose : Works as Sort but works on the Graph
63 -- Default directly calls Sort, but it can be redefined
64 -- If SortInGraph is redefined, Sort should be defined even if
65 -- not called (to avoid deferred methods in a final class)
66
67
68 Label (me) returns AsciiString from TCollection;
69 ---Purpose : Returns a text saying "Picked" or "Removed", plus the
70 -- specific criterium returned by ExtractLabel (see below)
71
72 ExtractLabel (me) returns AsciiString from TCollection is deferred;
73 ---Purpose : Returns a text defining the criterium for extraction
74
75fields
76
77 thesort : Boolean;
78
79end SelectExtract;