0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / IFSelect / IFSelect_SelectExplore.hxx
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 under
9 // the terms of the GNU Lesser General Public License 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 #ifndef _IFSelect_SelectExplore_HeaderFile
18 #define _IFSelect_SelectExplore_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <IFSelect_SelectDeduct.hxx>
25 #include <Standard_Boolean.hxx>
26 class Interface_EntityIterator;
27 class Interface_Graph;
28 class Standard_Transient;
29 class TCollection_AsciiString;
30
31
32 class IFSelect_SelectExplore;
33 DEFINE_STANDARD_HANDLE(IFSelect_SelectExplore, IFSelect_SelectDeduct)
34
35 //! A SelectExplore determines from an input list of Entities,
36 //! a list obtained by a way of exploration. This implies the
37 //! possibility of recursive exploration : the output list is
38 //! itself reused as input, etc...
39 //! Examples : Shared Entities, can be considered at one level
40 //! (immediate shared) or more, or max level
41 //!
42 //! Then, for each input entity, if it is not rejected, it can be
43 //! either taken itself, or explored : it then produces a list.
44 //! According to a level, either the produced lists or taken
45 //! entities give the result (level one), or lists are themselves
46 //! considered and for each item, is it taken or explored.
47 //!
48 //! Remark that rejection is just a safety : normally, an input
49 //! entity is, either taken itself, or explored
50 //! A maximum level can be specified. Else, the process continues
51 //! until all entities have been either taken or rejected
52 class IFSelect_SelectExplore : public IFSelect_SelectDeduct
53 {
54
55 public:
56
57   
58   //! Returns the required exploring level
59   Standard_EXPORT Standard_Integer Level() const;
60   
61   //! Returns the list of selected entities. Works by calling the
62   //! method Explore on each input entity : it can be rejected,
63   //! taken for output, or to explore. If the maximum level has not
64   //! yet been attained, or if no max level is specified, entities
65   //! to be explored are themselves used as if they were input
66   Standard_EXPORT Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE;
67   
68   //! Analyses and, if required, Explores an entity, as follows :
69   //! The explored list starts as empty, it has to be filled by this
70   //! method.
71   //! If it returns False, <ent> is rejected for result (this is to
72   //! be used only as safety)
73   //! If it returns True and <explored> remains empty, <ent> is
74   //! taken itself for result, not explored
75   //! If it returns True and <explored> is not empty, the content
76   //! of this list is considered :
77   //! If maximum level is attained, it is taken for result
78   //! Else (or no max), each of its entity will be itself explored
79   Standard_EXPORT virtual Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const = 0;
80   
81   //! Returns a text saying "(Recursive)" or "(Level nn)" plus
82   //! specific criterium returned by ExploreLabel (see below)
83   Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
84   
85   //! Returns a text defining the way of exploration
86   Standard_EXPORT virtual TCollection_AsciiString ExploreLabel() const = 0;
87
88
89
90
91   DEFINE_STANDARD_RTTI(IFSelect_SelectExplore,IFSelect_SelectDeduct)
92
93 protected:
94
95   
96   //! Initializes a SelectExplore : the level must be specified on
97   //! starting. 0 means all levels, 1 means level one only, etc...
98   Standard_EXPORT IFSelect_SelectExplore(const Standard_Integer level);
99
100
101
102 private:
103
104
105   Standard_Integer thelevel;
106
107
108 };
109
110
111
112
113
114
115
116 #endif // _IFSelect_SelectExplore_HeaderFile