Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2009-04-06
0002 // Created by: Sergey ZARITCHNY
0003 // Copyright (c) 2009-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _TDataXtd_Shape_HeaderFile
0017 #define _TDataXtd_Shape_HeaderFile
0018 
0019 #include <TDataStd_GenericEmpty.hxx>
0020 class TopoDS_Shape;
0021 class TDF_DataSet;
0022 
0023 
0024 class TDataXtd_Shape;
0025 DEFINE_STANDARD_HANDLE(TDataXtd_Shape, TDataStd_GenericEmpty)
0026 
0027 //! A Shape is associated in the framework with :
0028 //! a NamedShape attribute
0029 class TDataXtd_Shape : public TDataStd_GenericEmpty
0030 {
0031 
0032 public:
0033 
0034   
0035   //! class methods
0036   //! =============
0037   //! try to retrieve a Shape attribute at <current> label
0038   //! or in  fathers  label of  <current>. Returns True  if
0039   //! found and set <S>.
0040   Standard_EXPORT static Standard_Boolean Find (const TDF_Label& current, Handle(TDataXtd_Shape)& S);
0041   
0042   //! Find, or create, a Shape attribute.  the Shape attribute
0043   //! is returned. Raises if <label> has attribute.
0044   Standard_EXPORT static Handle(TDataXtd_Shape) New (const TDF_Label& label);
0045   
0046   //! Create or update associated NamedShape attribute.  the
0047   //! Shape attribute is returned.
0048   Standard_EXPORT static Handle(TDataXtd_Shape) Set (const TDF_Label& label, const TopoDS_Shape& shape);
0049   
0050   //! the Shape from  associated NamedShape attribute
0051   //! is returned.
0052   Standard_EXPORT static TopoDS_Shape Get (const TDF_Label& label);
0053   
0054   //! Shape methods
0055   //! ============
0056   Standard_EXPORT static const Standard_GUID& GetID();
0057   
0058   Standard_EXPORT TDataXtd_Shape();
0059   
0060   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0061   
0062   Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
0063   
0064   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
0065 
0066 
0067   DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Shape, TDataStd_GenericEmpty)
0068 
0069 protected:
0070 
0071 
0072 
0073 
0074 private:
0075 
0076 
0077 
0078 
0079 };
0080 
0081 
0082 
0083 
0084 
0085 
0086 
0087 #endif // _TDataXtd_Shape_HeaderFile