0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / TNaming / TNaming_Localizer.hxx
1 // Created on: 1997-06-10
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1997-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 _TNaming_Localizer_HeaderFile
18 #define _TNaming_Localizer_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Integer.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 #include <TNaming_ListOfMapOfShape.hxx>
27 #include <TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx>
28 #include <TopTools_MapOfShape.hxx>
29 #include <TopAbs_ShapeEnum.hxx>
30 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
31 #include <TNaming_Evolution.hxx>
32 #include <TNaming_ListOfNamedShape.hxx>
33 #include <TNaming_MapOfNamedShape.hxx>
34 #include <Standard_Boolean.hxx>
35 class TNaming_UsedShapes;
36 class TopoDS_Shape;
37 class TDF_Label;
38 class TNaming_NamedShape;
39
40
41
42 class TNaming_Localizer 
43 {
44 public:
45
46   DEFINE_STANDARD_ALLOC
47
48   
49   Standard_EXPORT TNaming_Localizer();
50   
51   Standard_EXPORT void Init (const Handle(TNaming_UsedShapes)& US, const Standard_Integer CurTrans);
52   
53   Standard_EXPORT const TopTools_MapOfShape& SubShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
54   
55   Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& Ancestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
56   
57   Standard_EXPORT void FindFeaturesInAncestors (const TopoDS_Shape& S, const TopoDS_Shape& In, TopTools_MapOfShape& AncInFeatures);
58   
59   Standard_EXPORT void GoBack (const TopoDS_Shape& S, const TDF_Label& Lab, const TNaming_Evolution Evol, TopTools_ListOfShape& OldS, TNaming_ListOfNamedShape& OldLab);
60   
61   Standard_EXPORT void Backward (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TNaming_MapOfNamedShape& Primitives, TopTools_MapOfShape& ValidShapes);
62   
63   Standard_EXPORT void FindNeighbourg (const TopoDS_Shape& Cont, const TopoDS_Shape& S, TopTools_MapOfShape& Neighbourg);
64   
65   Standard_EXPORT static Standard_Boolean IsNew (const TopoDS_Shape& S, const Handle(TNaming_NamedShape)& NS);
66   
67   Standard_EXPORT static void FindGenerator (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TopTools_ListOfShape& theListOfGenerators);
68   
69   //! Finds context of the shape <S>.
70   Standard_EXPORT static void FindShapeContext (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& theS, TopoDS_Shape& theSC);
71
72
73
74
75 protected:
76
77
78
79
80
81 private:
82
83
84
85   Standard_Integer myCurTrans;
86   Handle(TNaming_UsedShapes) myUS;
87   TopTools_ListOfShape myShapeWithSubShapes;
88   TNaming_ListOfMapOfShape mySubShapes;
89   TopTools_ListOfShape myShapeWithAncestors;
90   TNaming_ListOfIndexedDataMapOfShapeListOfShape myAncestors;
91
92
93 };
94
95
96
97
98
99
100
101 #endif // _TNaming_Localizer_HeaderFile