Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 2000-08-30 |
2 | -- Created by: data exchange team | |
3 | -- Copyright (c) 2000-2012 OPEN CASCADE SAS | |
4 | -- | |
5 | -- The content of this file is subject to the Open CASCADE Technology Public | |
6 | -- License Version 6.5 (the "License"). You may not use the content of this file | |
7 | -- except in compliance with the License. Please obtain a copy of the License | |
8 | -- at http://www.opencascade.org and read it completely before using this file. | |
9 | -- | |
10 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |
11 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |
12 | -- | |
13 | -- The Original Code and all software distributed under the License is | |
14 | -- distributed on an "AS IS" basis, without warranty of any kind, and the | |
15 | -- Initial Developer hereby disclaims all such warranties, including without | |
16 | -- limitation, any warranties of merchantability, fitness for a particular | |
17 | -- purpose or non-infringement. Please see the License for the specific terms | |
18 | -- and conditions governing the rights and limitations under the License. | |
19 | ||
7fd59977 | 20 | |
21 | ||
22 | class DocumentTool from XCAFDoc inherits Attribute from TDF | |
23 | ||
24 | ---Purpose: Defines sections structure of an XDE document. | |
25 | ||
26 | uses | |
27 | Label from TDF, | |
28 | Document from TDocStd, | |
29 | RelocationTable from TDF, | |
30 | ShapeTool from XCAFDoc, | |
31 | ColorTool from XCAFDoc, | |
32 | LayerTool from XCAFDoc, | |
33 | DimTolTool from XCAFDoc, | |
34 | MaterialTool from XCAFDoc | |
35 | ||
36 | is | |
37 | ||
38 | GetID (myclass) | |
39 | ---C++: return const & | |
40 | returns GUID from Standard; | |
41 | ||
42 | Set (myclass; L: Label from TDF; | |
43 | IsAcces: Boolean from Standard = Standard_True) | |
44 | ---Purpose: Create (if not exist) DocumentTool attribute | |
45 | -- on 0.1 label if <IsAcces> is true, else | |
46 | -- on <L> label. | |
47 | -- This label will be returned by DocLabel(); | |
48 | -- If the attribute is already set it won't be reset on | |
49 | -- <L> even if <IsAcces> is false. | |
50 | -- ColorTool and ShapeTool attributes are also set by this method. | |
51 | returns DocumentTool from XCAFDoc; | |
52 | ||
53 | IsXCAFDocument(myclass; Doc : Document from TDocStd) | |
54 | returns Boolean from Standard; | |
55 | ||
56 | ||
57 | ||
58 | ---Category: methods defining document structure | |
59 | ||
60 | DocLabel(myclass; acces: Label from TDF) returns Label from TDF; | |
61 | ---Purpose: Returns label where the DocumentTool attribute is or | |
62 | -- 0.1 if DocumentTool is not yet set. | |
63 | ||
64 | ShapesLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
65 | ---Purpose: Returns sub-label of DocLabel() with tag 1. | |
66 | ||
67 | ColorsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
68 | ---Purpose: Returns sub-label of DocLabel() with tag 2. | |
69 | ||
70 | LayersLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
71 | ---Purpose: Returns sub-label of DocLabel() with tag 3. | |
72 | ||
73 | DGTsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
74 | ---Purpose: Returns sub-label of DocLabel() with tag 4. | |
75 | ||
76 | MaterialsLabel (myclass; acces: Label from TDF) returns Label from TDF; | |
77 | ---Purpose: Returns sub-label of DocLabel() with tag 5. | |
78 | ||
79 | ||
80 | ShapeTool (myclass; acces: Label from TDF) returns ShapeTool from XCAFDoc; | |
81 | ---Purpose: Creates (if it does not exist) ShapeTool attribute on ShapesLabel(). | |
82 | ||
83 | ColorTool(myclass; acces: Label from TDF) returns ColorTool from XCAFDoc; | |
84 | ---Purpose: Creates (if it does not exist) ColorTool attribute on ColorsLabel(). | |
85 | ||
86 | LayerTool(myclass; acces: Label from TDF) returns LayerTool from XCAFDoc; | |
87 | ---Purpose: Creates (if it does not exist) LayerTool attribute on LayersLabel(). | |
88 | ||
89 | DimTolTool(myclass; acces: Label from TDF) returns DimTolTool from XCAFDoc; | |
90 | ---Purpose: Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). | |
91 | ||
92 | MaterialTool(myclass; acces: Label from TDF) returns MaterialTool from XCAFDoc; | |
93 | ---Purpose: Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). | |
94 | ||
95 | ||
96 | Create | |
97 | returns mutable DocumentTool from XCAFDoc; | |
98 | ||
99 | Init(me); | |
100 | ---Purpose: to be called when reading this attribute from file | |
101 | ||
102 | ---Category: TDF_Attribute methods | |
103 | -- ===================== | |
104 | ||
105 | ID (me) | |
106 | ---C++: return const & | |
107 | returns GUID from Standard; | |
108 | ||
109 | Restore (me: mutable; with : Attribute from TDF); | |
110 | ||
111 | NewEmpty (me) | |
112 | returns mutable Attribute from TDF; | |
113 | ||
114 | Paste (me; into : mutable Attribute from TDF; | |
115 | RT : mutable RelocationTable from TDF); | |
116 | ||
f898928a RL |
117 | Destroy (me: mutable) is virtual; |
118 | ---C++ : alias ~ | |
119 | ---Purpose: Unregisters the document holding this attribute from an | |
120 | -- internal global map of XDE documents. | |
121 | ||
7fd59977 | 122 | end DocumentTool; |