0024510: Remove unused local variables
[occt.git] / src / IFSelect / IFSelect_SelectExplore.cdl
1 -- Created on: 1996-09-25
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class SelectExplore  from IFSelect  inherits SelectDeduct
18
19     ---Purpose : A SelectExplore determines from an input list of Entities,
20     --           a list obtained by a way of exploration. This implies the
21     --           possibility of recursive exploration : the output list is
22     --           itself reused as input, etc...
23     --           Examples : Shared Entities, can be considered at one level
24     --           (immediate shared) or more, or max level
25     --           
26     --           Then, for each input entity, if it is not rejected, it can be
27     --           either taken itself, or explored : it then produces a list.
28     --           According to a level, either the produced lists or taken
29     --           entities give the result (level one), or lists are themselves
30     --           considered and for each item, is it taken or explored.
31     --           
32     --           Remark that rejection is just a safety : normally, an input
33     --             entity is, either taken itself, or explored
34     --           A maximum level can be specified. Else, the process continues
35     --           until all entities have been either taken or rejected
36
37 uses AsciiString from TCollection, InterfaceModel, EntityIterator,  Graph
38
39 is
40
41     Initialize (level : Integer);
42     ---Purpose : Initializes a SelectExplore : the level must be specified on
43     --           starting. 0 means all levels, 1 means level one only, etc...
44
45     Level (me) returns Integer;
46     ---Purpose : Returns the required exploring level
47
48     RootResult (me; G : Graph) returns EntityIterator;
49     ---Purpose : Returns the list of selected entities. Works by calling the
50     --           method Explore on each input entity : it can be rejected,
51     --           taken for output, or to explore. If the maximum level has not
52     --           yet been attained, or if no max level is specified, entities
53     --           to be explored are themselves used as if they were input
54
55     Explore (me; level : Integer; ent : Transient; G : Graph;
56              explored : in out EntityIterator)
57         returns Boolean  is deferred;
58     ---Purpose : Analyses and, if required, Explores an entity, as follows :
59     --           The explored list starts as empty, it has to be filled by this
60     --           method.
61     --           If it returns False, <ent> is rejected for result (this is to
62     --               be used only as safety)
63     --           If it returns True and <explored> remains empty, <ent> is
64     --             taken itself for result, not explored
65     --           If it returns True and <explored> is not empty, the content
66     --             of this list is considered :
67     --             If maximum level is attained, it is taken for result
68     --             Else (or no max), each of its entity will be itself explored
69
70     Label (me) returns AsciiString from TCollection;
71     ---Purpose : Returns a text saying "(Recursive)" or "(Level nn)" plus
72     --           specific criterium returned by ExploreLabel (see below)
73
74     ExploreLabel (me) returns AsciiString from TCollection  is deferred;
75     ---Purpose : Returns a text defining the way of exploration
76
77 fields
78
79     thelevel : Integer;
80
81 end SelectExplore;