Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:21

0001 // Created on: 1997-06-10
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _TNaming_Localizer_HeaderFile
0018 #define _TNaming_Localizer_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <TopTools_ListOfShape.hxx>
0026 #include <TNaming_ListOfMapOfShape.hxx>
0027 #include <TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx>
0028 #include <TopTools_MapOfShape.hxx>
0029 #include <TopAbs_ShapeEnum.hxx>
0030 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0031 #include <TNaming_Evolution.hxx>
0032 #include <TNaming_ListOfNamedShape.hxx>
0033 #include <TNaming_MapOfNamedShape.hxx>
0034 class TNaming_UsedShapes;
0035 class TopoDS_Shape;
0036 class TDF_Label;
0037 class TNaming_NamedShape;
0038 
0039 
0040 
0041 class TNaming_Localizer 
0042 {
0043 public:
0044 
0045   DEFINE_STANDARD_ALLOC
0046 
0047   
0048   Standard_EXPORT TNaming_Localizer();
0049   
0050   Standard_EXPORT void Init (const Handle(TNaming_UsedShapes)& US, const Standard_Integer CurTrans);
0051   
0052   Standard_EXPORT const TopTools_MapOfShape& SubShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
0053   
0054   Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& Ancestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
0055   
0056   Standard_EXPORT void FindFeaturesInAncestors (const TopoDS_Shape& S, const TopoDS_Shape& In, TopTools_MapOfShape& AncInFeatures);
0057   
0058   Standard_EXPORT void GoBack (const TopoDS_Shape& S, const TDF_Label& Lab, const TNaming_Evolution Evol, TopTools_ListOfShape& OldS, TNaming_ListOfNamedShape& OldLab);
0059   
0060   Standard_EXPORT void Backward (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TNaming_MapOfNamedShape& Primitives, TopTools_MapOfShape& ValidShapes);
0061   
0062   Standard_EXPORT void FindNeighbourg (const TopoDS_Shape& Cont, const TopoDS_Shape& S, TopTools_MapOfShape& Neighbourg);
0063   
0064   Standard_EXPORT static Standard_Boolean IsNew (const TopoDS_Shape& S, const Handle(TNaming_NamedShape)& NS);
0065   
0066   Standard_EXPORT static void FindGenerator (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TopTools_ListOfShape& theListOfGenerators);
0067   
0068   //! Finds context of the shape <S>.
0069   Standard_EXPORT static void FindShapeContext (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& theS, TopoDS_Shape& theSC);
0070 
0071 
0072 
0073 
0074 protected:
0075 
0076 
0077 
0078 
0079 
0080 private:
0081 
0082 
0083 
0084   Standard_Integer myCurTrans;
0085   Handle(TNaming_UsedShapes) myUS;
0086   TopTools_ListOfShape myShapeWithSubShapes;
0087   TNaming_ListOfMapOfShape mySubShapes;
0088   TopTools_ListOfShape myShapeWithAncestors;
0089   TNaming_ListOfIndexedDataMapOfShapeListOfShape myAncestors;
0090 
0091 
0092 };
0093 
0094 
0095 
0096 
0097 
0098 
0099 
0100 #endif // _TNaming_Localizer_HeaderFile