Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:23

0001 // Created by: DAUTRY Philippe
0002 // Copyright (c) 1997-1999 Matra Datavision
0003 // Copyright (c) 1999-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 _DDF_Browser_HeaderFile
0017 #define _DDF_Browser_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <TDF_AttributeIndexedMap.hxx>
0023 #include <Draw_Drawable3D.hxx>
0024 #include <Standard_OStream.hxx>
0025 #include <Draw_Interpretor.hxx>
0026 #include <Standard_Integer.hxx>
0027 class TDF_Data;
0028 class Draw_Display;
0029 class TCollection_AsciiString;
0030 class TDF_Label;
0031 
0032 
0033 class DDF_Browser;
0034 DEFINE_STANDARD_HANDLE(DDF_Browser, Draw_Drawable3D)
0035 
0036 //! Browses a data framework from TDF.
0037 class DDF_Browser : public Draw_Drawable3D
0038 {
0039 
0040 public:
0041 
0042   
0043   Standard_EXPORT DDF_Browser(const Handle(TDF_Data)& aDF);
0044   
0045   Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0046   
0047   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0048   
0049   Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
0050   
0051   Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
0052   
0053   Standard_EXPORT void Data (const Handle(TDF_Data)& aDF);
0054   
0055   Standard_EXPORT Handle(TDF_Data) Data() const;
0056   
0057   //! Returns a string composed with the sub-label
0058   //! entries of <myDF>.
0059   Standard_EXPORT TCollection_AsciiString OpenRoot() const;
0060   
0061   //! Returns a string composed with the sub-label
0062   //! entries of <aLab>.
0063   Standard_EXPORT TCollection_AsciiString OpenLabel (const TDF_Label& aLab) const;
0064   
0065   //! Returns a string composed with the attribute index
0066   //! (found in <myAttMap>) of <aLab>.
0067   Standard_EXPORT TCollection_AsciiString OpenAttributeList (const TDF_Label& aLab);
0068   
0069   //! Returns a string composed with the list of
0070   //! referenced attribute index of the attribute
0071   //! <anIndex>. For example, it is useful for
0072   //! TDataStd_Group. It uses a mechanism based on a
0073   //! DDF_AttributeBrowser.
0074   Standard_EXPORT TCollection_AsciiString OpenAttribute (const Standard_Integer anIndex = 0);
0075   
0076   //! Returns information about <me> to be displayed in
0077   //! information window.
0078   Standard_EXPORT TCollection_AsciiString Information() const;
0079   
0080   //! Returns information about <aLab> to be displayed
0081   //! in information window.
0082   Standard_EXPORT TCollection_AsciiString Information (const TDF_Label& aLab) const;
0083   
0084   //! Returns information about attribute <anIndex> to
0085   //! be displayed in information window.
0086   Standard_EXPORT TCollection_AsciiString Information (const Standard_Integer anIndex = 0) const;
0087 
0088 
0089 
0090 
0091   DEFINE_STANDARD_RTTIEXT(DDF_Browser,Draw_Drawable3D)
0092 
0093 protected:
0094 
0095 
0096 
0097 
0098 private:
0099 
0100 
0101   Handle(TDF_Data) myDF;
0102   TDF_AttributeIndexedMap myAttMap;
0103 
0104 
0105 };
0106 
0107 
0108 
0109 
0110 
0111 
0112 
0113 #endif // _DDF_Browser_HeaderFile