Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:20:03

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 <NCollection_IndexedMap.hxx>
0023 #include <Draw_Drawable3D.hxx>
0024 #include <Standard_OStream.hxx>
0025 #include <Draw_Interpretor.hxx>
0026 #include <Standard_Integer.hxx>
0027 
0028 class TDF_Attribute;
0029 class TDF_Data;
0030 class Draw_Display;
0031 class TCollection_AsciiString;
0032 class TDF_Label;
0033 
0034 //! Browses a data framework from TDF.
0035 class DDF_Browser : public Draw_Drawable3D
0036 {
0037 
0038 public:
0039   Standard_EXPORT DDF_Browser(const occ::handle<TDF_Data>& aDF);
0040 
0041   Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0042 
0043   Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0044 
0045   Standard_EXPORT void Dump(Standard_OStream& S) const override;
0046 
0047   Standard_EXPORT void Whatis(Draw_Interpretor& I) const override;
0048 
0049   Standard_EXPORT void Data(const occ::handle<TDF_Data>& aDF);
0050 
0051   Standard_EXPORT occ::handle<TDF_Data> Data() const;
0052 
0053   //! Returns a string composed with the sub-label
0054   //! entries of <myDF>.
0055   Standard_EXPORT TCollection_AsciiString OpenRoot() const;
0056 
0057   //! Returns a string composed with the sub-label
0058   //! entries of <aLab>.
0059   Standard_EXPORT TCollection_AsciiString OpenLabel(const TDF_Label& aLab) const;
0060 
0061   //! Returns a string composed with the attribute index
0062   //! (found in <myAttMap>) of <aLab>.
0063   Standard_EXPORT TCollection_AsciiString OpenAttributeList(const TDF_Label& aLab);
0064 
0065   //! Returns a string composed with the list of
0066   //! referenced attribute index of the attribute
0067   //! <anIndex>. For example, it is useful for
0068   //! TDataStd_Group. It uses a mechanism based on a
0069   //! DDF_AttributeBrowser.
0070   Standard_EXPORT TCollection_AsciiString OpenAttribute(const int anIndex = 0);
0071 
0072   //! Returns information about <me> to be displayed in
0073   //! information window.
0074   Standard_EXPORT TCollection_AsciiString Information() const;
0075 
0076   //! Returns information about <aLab> to be displayed
0077   //! in information window.
0078   Standard_EXPORT TCollection_AsciiString Information(const TDF_Label& aLab) const;
0079 
0080   //! Returns information about attribute <anIndex> to
0081   //! be displayed in information window.
0082   Standard_EXPORT TCollection_AsciiString Information(const int anIndex = 0) const;
0083 
0084   DEFINE_STANDARD_RTTIEXT(DDF_Browser, Draw_Drawable3D)
0085 
0086 private:
0087   occ::handle<TDF_Data>                              myDF;
0088   NCollection_IndexedMap<occ::handle<TDF_Attribute>> myAttMap;
0089 };
0090 
0091 #endif // _DDF_Browser_HeaderFile