Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-09-08
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_Naming_HeaderFile
0018 #define _TNaming_Naming_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TNaming_Name.hxx>
0024 #include <TDF_Attribute.hxx>
0025 #include <TDF_LabelMap.hxx>
0026 #include <Standard_OStream.hxx>
0027 #include <TDF_AttributeIndexedMap.hxx>
0028 class Standard_GUID;
0029 class TDF_Label;
0030 class TNaming_NamedShape;
0031 class TopoDS_Shape;
0032 class TDF_RelocationTable;
0033 class TDF_DataSet;
0034 class TDF_IDFilter;
0035 
0036 
0037 class TNaming_Naming;
0038 DEFINE_STANDARD_HANDLE(TNaming_Naming, TDF_Attribute)
0039 
0040 //! This attribute  store the  topological  naming of any
0041 //! selected   shape,  when this  shape  is  not  already
0042 //! attached to a specific label. This class is also used
0043 //! to solve  it when  the argumentsof the  toipological
0044 //! naming are modified.
0045 class TNaming_Naming : public TDF_Attribute
0046 {
0047 
0048 public:
0049 
0050   
0051   //! following code from TDesignStd
0052   //! ==============================
0053   Standard_EXPORT static const Standard_GUID& GetID();
0054   
0055   Standard_EXPORT static Handle(TNaming_Naming) Insert (const TDF_Label& under);
0056   
0057   //! Creates  a   Namimg  attribute  at  label <where>   to
0058   //! identify  the   shape   <Selection>.    Geometry is
0059   //! Standard_True  if   we  are  only  interested  by  the
0060   //! underlying   geometry     (e.g.     setting   a
0061   //! constraint). <Context> is  used to find neighbours  of
0062   //! <S> when required by the naming.
0063   //! If KeepOrientation is True the Selection orientation is taken
0064   //! into  account. BNproblem == True points out that Context sub-shapes
0065   //! in  DF have orientation differences with Context shape itself.
0066   //! instance method
0067   //! ===============
0068   Standard_EXPORT static Handle(TNaming_NamedShape) Name (const TDF_Label& where, const TopoDS_Shape& Selection, const TopoDS_Shape& Context, const Standard_Boolean Geometry = Standard_False, const Standard_Boolean KeepOrientation = Standard_False, const Standard_Boolean BNproblem = Standard_False);
0069   
0070   Standard_EXPORT TNaming_Naming();
0071   
0072   Standard_EXPORT Standard_Boolean IsDefined() const;
0073   
0074   Standard_EXPORT const TNaming_Name& GetName() const;
0075   
0076   Standard_EXPORT TNaming_Name& ChangeName();
0077   
0078   //! regenerate only the Name associated to me
0079   Standard_EXPORT Standard_Boolean Regenerate (TDF_LabelMap& scope);
0080   
0081   //! Regenerate recursively the  whole name with scope.  If
0082   //! scope  is empty it  means that  all the labels  of the
0083   //! framework are valid.
0084   Standard_EXPORT Standard_Boolean Solve (TDF_LabelMap& scope);
0085   
0086   //! Deferred methods from TDF_Attribute
0087   //! ===================================
0088   Standard_EXPORT virtual const Standard_GUID& ID() const Standard_OVERRIDE;
0089   
0090   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0091   
0092   Standard_EXPORT void Restore (const Handle(TDF_Attribute)& With) Standard_OVERRIDE;
0093   
0094   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
0095   
0096   Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& aDataSet) const Standard_OVERRIDE;
0097   
0098   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
0099   
0100   Standard_EXPORT virtual void ExtendedDump (Standard_OStream& anOS, const TDF_IDFilter& aFilter, TDF_AttributeIndexedMap& aMap) const Standard_OVERRIDE;
0101   
0102   //! Dumps the content of me into the stream
0103   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0104 
0105 
0106 
0107 
0108   DEFINE_STANDARD_RTTIEXT(TNaming_Naming,TDF_Attribute)
0109 
0110 protected:
0111 
0112 
0113 
0114 
0115 private:
0116 
0117 
0118   TNaming_Name myName;
0119 
0120 
0121 };
0122 
0123 
0124 
0125 
0126 
0127 
0128 
0129 #endif // _TNaming_Naming_HeaderFile