b311480e |
1 | -- Created on: 1999-06-25 |
2 | -- Created by: Sergey RUIN |
3 | -- Copyright (c) 1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | |
24 | class Directory from TDataStd inherits Attribute from TDF |
25 | |
26 | ---Purpose: Associates a directory in the data framework with |
27 | -- a TDataStd_TagSource attribute. |
28 | -- You can create a new directory label and add |
29 | -- sub-directory or object labels to it, |
30 | |
31 | |
32 | uses Attribute from TDF, |
33 | Label from TDF, |
34 | GUID from Standard, |
35 | DataSet from TDF, |
36 | RelocationTable from TDF |
37 | is |
38 | |
39 | |
40 | ---Purpose: class methods |
41 | -- ============= |
42 | |
43 | |
44 | Find (myclass; current : Label from TDF; D : in out Directory from TDataStd) |
45 | ---Purpose: Searches for a directory attribute on the label |
46 | -- current, or on one of the father labels of current. |
47 | -- If a directory attribute is found, true is returned, |
48 | -- and the attribute found is set as D. |
49 | returns Boolean from Standard; |
50 | |
51 | New (myclass; label : Label from TDF) |
52 | ---Purpose: Creates an enpty Directory attribute, located at |
53 | -- <label>. Raises if <label> has attribute |
54 | returns Directory from TDataStd; |
55 | |
56 | AddDirectory (myclass; dir : Directory from TDataStd) |
57 | ---Purpose: Creates a new sub-label and sets the |
58 | -- sub-directory dir on that label. |
59 | returns Directory from TDataStd; |
60 | |
61 | MakeObjectLabel (myclass; dir : Directory from TDataStd) |
62 | ---Purpose: Makes new label and returns it to insert |
63 | -- other object attributes (sketch,part...etc...) |
64 | returns Label from TDF; |
65 | |
66 | |
67 | GetID (myclass) |
68 | ---C++: return const & |
69 | returns GUID from Standard; |
70 | |
71 | |
72 | ---Purpose: Directory methods |
73 | -- =============== |
74 | |
75 | Create |
76 | returns mutable Directory from TDataStd; |
77 | |
78 | ---Category: methodes de TDF_Attribute |
79 | -- ========================= |
80 | |
81 | ID (me) |
82 | ---C++: return const & |
83 | returns GUID from Standard; |
84 | |
85 | Restore (me: mutable; with : Attribute from TDF); |
86 | |
87 | NewEmpty (me) |
88 | returns mutable Attribute from TDF; |
89 | |
90 | Paste (me; into : mutable Attribute from TDF; |
91 | RT : mutable RelocationTable from TDF); |
92 | |
93 | References (me; DS : DataSet from TDF) is redefined; |
94 | |
95 | Dump(me; anOS : in out OStream from Standard) |
96 | returns OStream from Standard |
97 | is redefined; |
98 | ---C++: return & |
99 | |
100 | end Directory; |