0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / DDF / DDF_Browser.hxx
CommitLineData
42cf5bc1 1// Created by: DAUTRY Philippe
2// Copyright (c) 1997-1999 Matra Datavision
3// Copyright (c) 1999-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _DDF_Browser_HeaderFile
17#define _DDF_Browser_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <TDF_AttributeIndexedMap.hxx>
23#include <Draw_Drawable3D.hxx>
24#include <Standard_OStream.hxx>
25#include <Draw_Interpretor.hxx>
26#include <Standard_Integer.hxx>
27class TDF_Data;
28class Draw_Display;
29class Draw_Drawable3D;
30class TCollection_AsciiString;
31class TDF_Label;
32
33
34class DDF_Browser;
35DEFINE_STANDARD_HANDLE(DDF_Browser, Draw_Drawable3D)
36
37//! Browses a data framework from TDF.
38class DDF_Browser : public Draw_Drawable3D
39{
40
41public:
42
43
44 Standard_EXPORT DDF_Browser(const Handle(TDF_Data)& aDF);
45
79104795 46 Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
42cf5bc1 47
48 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
49
50 Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
51
52 Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
53
54 Standard_EXPORT void Data (const Handle(TDF_Data)& aDF);
55
56 Standard_EXPORT Handle(TDF_Data) Data() const;
57
58 //! Returns a string composed with the sub-label
59 //! entries of <myDF>.
60 Standard_EXPORT TCollection_AsciiString OpenRoot() const;
61
62 //! Returns a string composed with the sub-label
63 //! entries of <aLab>.
64 Standard_EXPORT TCollection_AsciiString OpenLabel (const TDF_Label& aLab) const;
65
66 //! Returns a string composed with the attribute index
67 //! (found in <myAttMap>) of <aLab>.
68 Standard_EXPORT TCollection_AsciiString OpenAttributeList (const TDF_Label& aLab);
69
70 //! Returns a string composed with the list of
71 //! referenced attribute index of the attribute
72 //! <anIndex>. For exemple, it is usefull for
73 //! TDataStd_Group. It uses a mecanism based on a
74 //! DDF_AttributeBrowser.
75 Standard_EXPORT TCollection_AsciiString OpenAttribute (const Standard_Integer anIndex = 0);
76
77 //! Returns information about <me> to be displayed in
78 //! information window.
79 Standard_EXPORT TCollection_AsciiString Information() const;
80
81 //! Returns information about <aLab> to be displayed
82 //! in information window.
83 Standard_EXPORT TCollection_AsciiString Information (const TDF_Label& aLab) const;
84
85 //! Returns information about attribute <anIndex> to
86 //! be displayed in information window.
87 Standard_EXPORT TCollection_AsciiString Information (const Standard_Integer anIndex = 0) const;
88
89
90
91
92efcf78 92 DEFINE_STANDARD_RTTIEXT(DDF_Browser,Draw_Drawable3D)
42cf5bc1 93
94protected:
95
96
97
98
99private:
100
101
102 Handle(TDF_Data) myDF;
103 TDF_AttributeIndexedMap myAttMap;
104
105
106};
107
108
109
110
111
112
113
114#endif // _DDF_Browser_HeaderFile