Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-25 08:30:42

0001 // Created on: 1997-03-19
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_Name_HeaderFile
0018 #define _TNaming_Name_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TNaming_NameType.hxx>
0025 #include <TopAbs_ShapeEnum.hxx>
0026 #include <TNaming_ListOfNamedShape.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TopoDS_Shape.hxx>
0029 #include <TDF_Label.hxx>
0030 #include <TopAbs_Orientation.hxx>
0031 #include <TDF_LabelMap.hxx>
0032 class TNaming_NamedShape;
0033 class TDF_RelocationTable;
0034 
0035 //! store the arguments of Naming.
0036 class TNaming_Name
0037 {
0038 public:
0039   DEFINE_STANDARD_ALLOC
0040 
0041   Standard_EXPORT TNaming_Name();
0042 
0043   Standard_EXPORT void Type(const TNaming_NameType aType);
0044 
0045   Standard_EXPORT void ShapeType(const TopAbs_ShapeEnum aType);
0046 
0047   Standard_EXPORT void Shape(const TopoDS_Shape& theShape);
0048 
0049   Standard_EXPORT void Append(const Handle(TNaming_NamedShape)& arg);
0050 
0051   Standard_EXPORT void StopNamedShape(const Handle(TNaming_NamedShape)& arg);
0052 
0053   Standard_EXPORT void Index(const Standard_Integer I);
0054 
0055   Standard_EXPORT void ContextLabel(const TDF_Label& theLab);
0056 
0057   Standard_EXPORT void Orientation(const TopAbs_Orientation theOrientation);
0058 
0059   Standard_EXPORT TNaming_NameType Type() const;
0060 
0061   Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
0062 
0063   Standard_EXPORT TopoDS_Shape Shape() const;
0064 
0065   Standard_EXPORT const TNaming_ListOfNamedShape& Arguments() const;
0066 
0067   Standard_EXPORT Handle(TNaming_NamedShape) StopNamedShape() const;
0068 
0069   Standard_EXPORT Standard_Integer Index() const;
0070 
0071   Standard_EXPORT const TDF_Label& ContextLabel() const;
0072 
0073   TopAbs_Orientation Orientation() const { return myOrientation; }
0074 
0075   Standard_EXPORT Standard_Boolean Solve(const TDF_Label& aLab, const TDF_LabelMap& Valid) const;
0076 
0077   Standard_EXPORT void Paste(TNaming_Name& into, const Handle(TDF_RelocationTable)& RT) const;
0078 
0079   //! Dumps the content of me into the stream
0080   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0081 
0082 private:
0083   TNaming_NameType           myType;
0084   TopAbs_ShapeEnum           myShapeType;
0085   TNaming_ListOfNamedShape   myArgs;
0086   Handle(TNaming_NamedShape) myStop;
0087   Standard_Integer           myIndex;
0088   TopoDS_Shape               myShape;
0089   TDF_Label                  myContextLabel;
0090   TopAbs_Orientation         myOrientation;
0091 };
0092 
0093 #endif // _TNaming_Name_HeaderFile