Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 2000-08-30 |
2 | -- Created by: data exchange team | |
973c2be1 | 3 | -- Copyright (c) 2000-2014 OPEN CASCADE SAS |
b311480e | 4 | -- |
973c2be1 | 5 | -- This file is part of Open CASCADE Technology software library. |
b311480e | 6 | -- |
d5f74e42 | 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 | |
973c2be1 | 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. | |
b311480e | 12 | -- |
973c2be1 | 13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. | |
7fd59977 | 15 | |
16 | class DocumentTool from XCAFDoc inherits Attribute from TDF | |
17 | ||
18 | ---Purpose: Defines sections structure of an XDE document. | |
ff8178ef | 19 | -- attribute marking CAF document as being DECAF document. |
20 | -- Creates the sections structure of the document. | |
7fd59977 | 21 | uses |
22 | Label from TDF, | |
23 | Document from TDocStd, | |
24 | RelocationTable from TDF, | |
25 | ShapeTool from XCAFDoc, | |
26 | ColorTool from XCAFDoc, | |
27 | LayerTool from XCAFDoc, | |
28 | DimTolTool from XCAFDoc, | |
29 | MaterialTool from XCAFDoc | |
30 | ||
31 | is | |
32 | ||
33 | GetID (myclass) | |
34 | ---C++: return const & | |
35 | returns GUID from Standard; | |
36 | ||
37 | Set (myclass; L: Label from TDF; | |
38 | IsAcces: Boolean from Standard = Standard_True) | |
39 | ---Purpose: Create (if not exist) DocumentTool attribute | |
40 | -- on 0.1 label if <IsAcces> is true, else | |
41 | -- on <L> label. | |
42 | -- This label will be returned by DocLabel(); | |
43 | -- If the attribute is already set it won't be reset on | |
44 | -- <L> even if <IsAcces> is false. | |
45 | -- ColorTool and ShapeTool attributes are also set by this method. | |
46 | returns DocumentTool from XCAFDoc; | |
47 | ||
48 | IsXCAFDocument(myclass; Doc : Document from TDocStd) | |
49 | returns Boolean from Standard; | |
50 | ||
51 | ||
52 | ||
53 | ---Category: methods defining document structure | |
54 | ||
55 | DocLabel(myclass; acces: Label from TDF) returns Label from TDF; | |
56 | ---Purpose: Returns label where the DocumentTool attribute is or | |
57 | -- 0.1 if DocumentTool is not yet set. | |
58 | ||
59 | ShapesLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
60 | ---Purpose: Returns sub-label of DocLabel() with tag 1. | |
61 | ||
62 | ColorsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
63 | ---Purpose: Returns sub-label of DocLabel() with tag 2. | |
64 | ||
65 | LayersLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
66 | ---Purpose: Returns sub-label of DocLabel() with tag 3. | |
67 | ||
68 | DGTsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
69 | ---Purpose: Returns sub-label of DocLabel() with tag 4. | |
70 | ||
71 | MaterialsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
72 | ---Purpose: Returns sub-label of DocLabel() with tag 5. | |
73 | ||
74 | ||
75 | ShapeTool (myclass; acces: Label from TDF) returns ShapeTool from XCAFDoc; | |
76 | ---Purpose: Creates (if it does not exist) ShapeTool attribute on ShapesLabel(). | |
77 | ||
78 | ColorTool(myclass; acces: Label from TDF) returns ColorTool from XCAFDoc; | |
79 | ---Purpose: Creates (if it does not exist) ColorTool attribute on ColorsLabel(). | |
80 | ||
81 | LayerTool(myclass; acces: Label from TDF) returns LayerTool from XCAFDoc; | |
82 | ---Purpose: Creates (if it does not exist) LayerTool attribute on LayersLabel(). | |
83 | ||
84 | DimTolTool(myclass; acces: Label from TDF) returns DimTolTool from XCAFDoc; | |
85 | ---Purpose: Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). | |
86 | ||
87 | MaterialTool(myclass; acces: Label from TDF) returns MaterialTool from XCAFDoc; | |
88 | ---Purpose: Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). | |
89 | ||
90 | ||
91 | Create | |
6e33d3ce | 92 | returns DocumentTool from XCAFDoc; |
7fd59977 | 93 | |
94 | Init(me); | |
95 | ---Purpose: to be called when reading this attribute from file | |
96 | ||
97 | ---Category: TDF_Attribute methods | |
98 | -- ===================== | |
99 | ||
100 | ID (me) | |
101 | ---C++: return const & | |
102 | returns GUID from Standard; | |
103 | ||
104 | Restore (me: mutable; with : Attribute from TDF); | |
105 | ||
106 | NewEmpty (me) | |
6e33d3ce | 107 | returns Attribute from TDF; |
7fd59977 | 108 | |
6e33d3ce | 109 | Paste (me; into : Attribute from TDF; |
110 | RT : RelocationTable from TDF); | |
7fd59977 | 111 | |
f898928a RL |
112 | Destroy (me: mutable) is virtual; |
113 | ---C++ : alias ~ | |
114 | ---Purpose: Unregisters the document holding this attribute from an | |
115 | -- internal global map of XDE documents. | |
116 | ||
7fd59977 | 117 | end DocumentTool; |