b311480e |
1 | -- Created on: 1997-02-04 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class NamedShape from TNaming inherits Attribute from TDF |
18 | |
19 | ---Purpose: The basis to define an attribute for the storage of |
20 | -- topology and naming data. |
21 | -- This attribute contains two parts: |
22 | -- - The type of evolution, a term of the |
23 | -- enumeration TNaming_Evolution |
24 | -- - A list of pairs of shapes called the "old" |
25 | -- shape and the "new" shape. The meaning |
26 | -- depends on the type of evolution. |
27 | |
28 | uses |
29 | GUID from Standard, |
30 | PtrNode from TNaming, |
31 | Evolution from TNaming, |
32 | DeltaOnModification from TDF, |
33 | DeltaOnRemoval from TDF, |
34 | RelocationTable from TDF, |
35 | AttributeIndexedMap from TDF, |
36 | Attribute from TDF, |
37 | AttributeDelta from TDF, |
38 | Delta from TDF, |
39 | DataSet from TDF, |
40 | Shape from TopoDS |
41 | |
42 | |
43 | is |
44 | |
45 | ---Purpose: class method |
46 | -- ============ |
47 | |
48 | GetID(myclass) returns GUID from Standard; |
49 | ---Purpose: Returns the GUID for named shapes. |
50 | ---C++: return const & |
51 | |
52 | Create returns mutable NamedShape from TNaming; |
53 | |
54 | |
55 | IsEmpty (me) |
56 | returns Boolean from Standard; |
57 | |
58 | Get (me) |
59 | ---Purpose: Returns the shapes contained in <NS>. Returns a null |
60 | -- shape if IsEmpty. |
61 | returns Shape from TopoDS; |
62 | |
63 | |
64 | Evolution (me) returns Evolution from TNaming; |
65 | ---Purpose: Returns the Evolution of the attribute. |
66 | ---C++: inline |
67 | |
68 | Version (me) returns Integer from Standard; |
69 | ---Purpose: Returns the Version of the attribute. |
70 | ---C++: inline |
71 | |
72 | SetVersion (me : mutable; version : Integer from Standard); |
73 | ---Purpose: Set the Version of the attribute. |
74 | ---C++: inline |
75 | |
76 | Clear (me : mutable); |
deb26df7 |
77 | ---C++: alias ~ |
7fd59977 |
78 | |
79 | ID(me) returns GUID from Standard |
80 | is redefined static; |
81 | ---Purpose: Returns the ID of the attribute. |
82 | ---C++: inline |
83 | ---C++: return const & |
84 | |
85 | BackupCopy(me) returns mutable Attribute from TDF |
86 | is redefined; |
87 | ---Purpose: Copies the attribute contents into a new other |
88 | -- attribute. It is used by Backup(). |
89 | |
90 | Restore(me: mutable; anAttribute : Attribute from TDF) |
91 | is redefined; |
92 | ---Purpose: Restores the contents from <anAttribute> into this |
93 | -- one. It is used when aborting a transaction. |
94 | -- |
95 | |
96 | -- Delta use methods |
97 | -- ----------------- |
98 | |
99 | DeltaOnModification(me; anOldAttribute : Attribute from TDF) |
100 | returns DeltaOnModification from TDF |
101 | ---Purpose : Makes a DeltaOnModification between <me> and |
102 | -- <anOldAttribute. |
103 | is redefined virtual; |
104 | |
105 | DeltaOnModification(me : mutable; aDelta : DeltaOnModification from TDF) |
106 | is redefined virtual; |
107 | ---Purpose: Applies a DeltaOnModification to <me>. |
108 | |
109 | DeltaOnRemoval(me) |
110 | returns DeltaOnRemoval from TDF |
111 | ---Purpose : Makes a DeltaOnRemoval on <me> because <me> has |
112 | -- disappeared from the DS. |
113 | is redefined virtual; |
114 | |
115 | |
116 | -- Copy use methods |
117 | -- ---------------- |
118 | |
119 | NewEmpty(me) |
120 | returns mutable Attribute from TDF |
121 | is redefined; |
122 | ---Purpose: Returns an new empty attribute from the good end |
123 | -- type. It is used by the copy algorithm. |
124 | |
125 | Paste(me; |
126 | intoAttribute : mutable Attribute from TDF; |
127 | aRelocTationable : mutable RelocationTable from TDF) |
128 | is redefined; |
129 | ---Purpose: This method is different from the "Copy" one, |
130 | -- because it is used when copying an attribute from |
131 | -- a source structure into a target structure. This |
132 | -- method pastes the current attribute to the label |
133 | -- corresponding to the insertor. The pasted |
134 | -- attribute may be a brand new one or a new version |
135 | -- of the previous one. |
136 | |
7fd59977 |
137 | References(me; aDataSet : DataSet from TDF) |
138 | is redefined; |
139 | ---Purpose: Adds the directly referenced attributes and labels |
140 | -- to <aDataSet>. "Directly" means we have only to |
141 | -- look at the first level of references. |
142 | |
143 | |
144 | BeforeRemoval(me: mutable) is redefined; |
145 | |
146 | BeforeUndo(me: mutable; |
147 | anAttDelta : AttributeDelta from TDF; |
148 | forceIt : Boolean from Standard = Standard_False) |
149 | returns Boolean from Standard |
150 | is redefined; |
151 | ---Purpose: Something to do before applying <anAttDelta> |
152 | |
153 | AfterUndo(me: mutable; |
154 | anAttDelta : AttributeDelta from TDF; |
155 | forceIt : Boolean from Standard = Standard_False) |
156 | returns Boolean from Standard |
157 | is redefined; |
158 | ---Purpose: Something to do after applying <anAttDelta>. |
159 | |
160 | |
161 | -- Methods to build contents of the TNaming attribute |
162 | -- This methods are private. the only one way to build |
163 | -- an Attribute is to use the TNaming_Builder. |
164 | ----------------------------------------------------- |
165 | |
166 | Add(me : mutable ; Evolution : in out PtrNode from TNaming) |
167 | ---Purpose: Adds an evolution |
168 | is private; |
169 | |
170 | |
171 | Dump(me; anOS : in out OStream from Standard) |
172 | returns OStream from Standard |
173 | is redefined ; |
174 | ---Purpose: Dumps the attribute on <aStream>. |
175 | ---C++: return & |
176 | |
177 | fields |
178 | myNode : PtrNode from TNaming; |
179 | myEvolution : Evolution from TNaming; |
180 | myVersion : Integer from Standard; |
181 | |
182 | friends |
183 | class Builder from TNaming, |
184 | class Iterator from TNaming, |
185 | class NewShapeIterator from TNaming, |
186 | class OldShapeIterator from TNaming |
187 | |
188 | end Attribute; |