0024157: Parallelization of assembly part of BO
[occt.git] / src / IFSelect / IFSelect_SelectExplore.cdl
CommitLineData
b311480e 1-- Created on: 1996-09-25
2-- Created by: Christian CAILLET
3-- Copyright (c) 1996-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 SelectExplore from IFSelect inherits SelectDeduct
24
25 ---Purpose : A SelectExplore determines from an input list of Entities,
26 -- a list obtained by a way of exploration. This implies the
27 -- possibility of recursive exploration : the output list is
28 -- itself reused as input, etc...
29 -- Examples : Shared Entities, can be considered at one level
30 -- (immediate shared) or more, or max level
31 --
32 -- Then, for each input entity, if it is not rejected, it can be
33 -- either taken itself, or explored : it then produces a list.
34 -- According to a level, either the produced lists or taken
35 -- entities give the result (level one), or lists are themselves
36 -- considered and for each item, is it taken or explored.
37 --
38 -- Remark that rejection is just a safety : normally, an input
39 -- entity is, either taken itself, or explored
40 -- A maximum level can be specified. Else, the process continues
41 -- until all entities have been either taken or rejected
42
43uses AsciiString from TCollection, InterfaceModel, EntityIterator, Graph
44
45is
46
47 Initialize (level : Integer);
48 ---Purpose : Initializes a SelectExplore : the level must be specified on
49 -- starting. 0 means all levels, 1 means level one only, etc...
50
51 Level (me) returns Integer;
52 ---Purpose : Returns the required exploring level
53
54 RootResult (me; G : Graph) returns EntityIterator;
55 ---Purpose : Returns the list of selected entities. Works by calling the
56 -- method Explore on each input entity : it can be rejected,
57 -- taken for output, or to explore. If the maximum level has not
58 -- yet been attained, or if no max level is specified, entities
59 -- to be explored are themselves used as if they were input
60
61 Explore (me; level : Integer; ent : Transient; G : Graph;
62 explored : in out EntityIterator)
63 returns Boolean is deferred;
64 ---Purpose : Analyses and, if required, Explores an entity, as follows :
65 -- The explored list starts as empty, it has to be filled by this
66 -- method.
67 -- If it returns False, <ent> is rejected for result (this is to
68 -- be used only as safety)
69 -- If it returns True and <explored> remains empty, <ent> is
70 -- taken itself for result, not explored
71 -- If it returns True and <explored> is not empty, the content
72 -- of this list is considered :
73 -- If maximum level is attained, it is taken for result
74 -- Else (or no max), each of its entity will be itself explored
75
76 Label (me) returns AsciiString from TCollection;
77 ---Purpose : Returns a text saying "(Recursive)" or "(Level nn)" plus
78 -- specific criterium returned by ExploreLabel (see below)
79
80 ExploreLabel (me) returns AsciiString from TCollection is deferred;
81 ---Purpose : Returns a text defining the way of exploration
82
83fields
84
85 thelevel : Integer;
86
87end SelectExplore;