0024157: Parallelization of assembly part of BO
[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
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23deferred class SelectExtract from IFSelect inherits SelectDeduct
24
25 ---Purpose : A SelectExtract determines a list of Entities from an Input
26 -- Selection, as a sub-list of the Input Result
27 -- It works by applying a sort criterium on each Entity of the
28 -- Input. This criterium can be applied Direct to Pick Items
29 -- (default case) or Reverse to Remove Item
30 --
31 -- Basic features (the unique Input) are inherited from SelectDeduct
32
33uses AsciiString from TCollection, InterfaceModel, EntityIterator, Graph
34
35is
36
37 Initialize;
38 ---Purpose : Initializes a SelectExtract : enforces the sort to be Direct
39
40 IsDirect (me) returns Boolean;
41 ---Purpose : Returns True if Sort criterium is Direct, False if Reverse
42
43 SetDirect (me : mutable; direct : Boolean);
44 ---Purpose : Sets Sort criterium sense to a new value
45 -- (True : Direct , False : Reverse)
46
47 -- Input : see SelectDeduct
48
49
50 RootResult (me; G : Graph) returns EntityIterator is virtual;
51 ---Purpose : Returns the list of selected entities. Works by calling the
52 -- method Sort on each input Entity : the Entity is kept as
53 -- output if Sort returns the same value as Direct status
54
55 Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
56 returns Boolean is deferred;
57 ---Purpose : Returns True for an Entity if it satisfies the Sort criterium
58 -- It receives :
59 -- - <rank>, the rank of the Entity in the Iteration,
60 -- - <ent> , the Entity itself, and
61 -- - <model>, the Starting Model
62 -- Hence, the Entity to check is "model->Value(num)" (but an
63 -- InterfaceModel allows other checks)
64 -- This method is specific to each class of SelectExtract
65
66 SortInGraph (me; rank : Integer; ent : Transient; G : Graph)
67 returns Boolean is virtual;
68 ---Purpose : Works as Sort but works on the Graph
69 -- Default directly calls Sort, but it can be redefined
70 -- If SortInGraph is redefined, Sort should be defined even if
71 -- not called (to avoid deferred methods in a final class)
72
73
74 Label (me) returns AsciiString from TCollection;
75 ---Purpose : Returns a text saying "Picked" or "Removed", plus the
76 -- specific criterium returned by ExtractLabel (see below)
77
78 ExtractLabel (me) returns AsciiString from TCollection is deferred;
79 ---Purpose : Returns a text defining the criterium for extraction
80
81fields
82
83 thesort : Boolean;
84
85end SelectExtract;