b311480e |
1 | -- Created on: 2007-05-29 |
2 | -- Created by: Vlad Romashko |
973c2be1 |
3 | -- Copyright (c) 2007-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 NamedData from TDataStd inherits Attribute from TDF |
17 | |
18 | ---Purpose: Contains a named data. |
19 | |
20 | uses |
21 | |
22 | GUID from Standard, |
23 | Attribute from TDF, |
24 | Label from TDF, |
25 | RelocationTable from TDF, |
26 | ExtendedString from TCollection, |
27 | HArray1OfInteger from TColStd, |
28 | HArray1OfReal from TColStd, |
29 | DataMapOfStringInteger from TColStd, |
30 | DataMapOfStringReal from TDataStd, |
31 | DataMapOfStringString from TDataStd, |
32 | DataMapOfStringByte from TDataStd, |
33 | DataMapOfStringHArray1OfInteger from TDataStd, |
34 | DataMapOfStringHArray1OfReal from TDataStd, |
35 | HDataMapOfStringInteger from TDataStd, |
36 | HDataMapOfStringReal from TDataStd, |
37 | HDataMapOfStringString from TDataStd, |
38 | HDataMapOfStringByte from TDataStd, |
39 | HDataMapOfStringHArray1OfInteger from TDataStd, |
40 | HDataMapOfStringHArray1OfReal from TDataStd |
41 | |
42 | is |
43 | |
44 | ---Purpose: Static methods |
45 | -- ============== |
46 | |
47 | GetID (myclass) |
48 | ---C++: return const & |
49 | ---Purpose: Returns the ID of the named data attribute. |
50 | returns GUID from Standard; |
51 | |
52 | Set (myclass; label : Label from TDF) |
53 | ---Purpose: Finds or creates a named data attribute. |
54 | returns NamedData from TDataStd; |
55 | |
56 | |
57 | ---Category: NamedData methods |
58 | -- ================= |
59 | |
60 | Create |
6e33d3ce |
61 | returns NamedData from TDataStd; |
7fd59977 |
62 | |
63 | |
64 | ---Category: Integers |
65 | -- ======== |
66 | |
67 | HasIntegers (me) |
68 | ---Purpose: Returns true if at least one named integer value is |
69 | -- kept in the attribute. |
70 | ---C++: inline |
71 | returns Boolean from Standard; |
72 | |
73 | HasInteger (me; |
74 | theName : ExtendedString from TCollection) |
75 | ---Purpose: Returns true if the attribute contains specified by Name |
76 | -- integer value. |
77 | returns Boolean from Standard; |
78 | |
79 | -- InitIntegers(me : mutable) |
80 | -- ---Purpose: Initializes internal container of Integers (to be used before access). |
81 | -- -- Returns True if succeed. |
82 | -- returns Boolean from Standard; |
83 | |
84 | GetInteger (me : mutable; |
85 | theName : ExtendedString from TCollection) |
86 | ---Purpose: Returns the integer value specified by the Name. |
87 | -- It returns 0 if internal map doesn't contain the specified |
88 | -- integer (use HasInteger() to check before). |
89 | returns Integer from Standard; |
90 | |
91 | SetInteger (me : mutable; |
92 | theName : ExtendedString from TCollection; |
93 | theInteger : Integer from Standard); |
94 | ---Purpose: Defines a named integer. |
95 | -- If the integer already exists, it changes its value to <theInteger>. |
96 | |
97 | GetIntegersContainer (me : mutable) |
98 | ---Purpose: Returns the internal container of named integers. |
99 | ---C++: return const & |
100 | returns DataMapOfStringInteger from TColStd; |
101 | |
102 | ChangeIntegers (me : mutable; |
103 | theIntegers : DataMapOfStringInteger from TColStd); |
104 | ---Purpose: Replace the container content by new content of the <theIntegers>. |
105 | |
106 | |
107 | ---Category: Reals |
108 | -- ===== |
109 | |
110 | HasReals (me) |
111 | ---Purpose: Returns true if at least one named real value is |
112 | -- kept in the attribute. |
113 | ---C++: inline |
114 | returns Boolean from Standard; |
115 | |
116 | HasReal (me; |
117 | theName : ExtendedString from TCollection) |
118 | ---Purpose: Returns true if the attribute contains a real specified by Name. |
119 | returns Boolean from Standard; |
120 | |
121 | GetReal (me : mutable; |
122 | theName : ExtendedString from TCollection) |
123 | ---Purpose: Returns the named real. |
124 | -- It returns 0.0 if there is no such a named real |
125 | -- (use HasReal()). |
126 | returns Real from Standard; |
127 | |
128 | SetReal (me : mutable; |
129 | theName : ExtendedString from TCollection; |
130 | theReal : Real from Standard); |
131 | ---Purpose: Defines a named real. |
132 | -- If the real already exists, it changes its value to <theReal>. |
133 | |
134 | GetRealsContainer (me: mutable) |
135 | ---Purpose: Returns the internal container of named reals. |
136 | ---C++: return const & |
137 | returns DataMapOfStringReal from TDataStd; |
138 | |
139 | ChangeReals (me : mutable; |
140 | theReals : DataMapOfStringReal from TDataStd); |
141 | ---Purpose: Replace the container content by new content of the <theReals>. |
142 | |
143 | ---Category: Strings |
144 | -- ======= |
145 | |
146 | HasStrings (me) |
147 | ---Purpose: Returns true if there are some named strings in the attribute. |
148 | ---C++: inline |
149 | returns Boolean from Standard; |
150 | |
151 | HasString (me; |
152 | theName : ExtendedString from TCollection) |
153 | ---Purpose: Returns true if the attribute contains this named string. |
154 | returns Boolean from Standard; |
155 | |
156 | GetString (me : mutable; |
157 | theName : ExtendedString from TCollection) |
158 | ---Purpose: Returns the named string. |
159 | -- It returns an empty string if there is no such a named string |
160 | -- (use HasString()). |
161 | ---C++: return const & |
162 | returns ExtendedString from TCollection; |
163 | |
164 | SetString (me : mutable; |
165 | theName : ExtendedString from TCollection; |
166 | theString : ExtendedString from TCollection); |
167 | ---Purpose: Defines a named string. |
168 | -- If the string already exists, it changes its value to <theString>. |
169 | |
170 | GetStringsContainer (me : mutable) |
171 | ---Purpose: Returns the internal container of named strings. |
172 | ---C++: return const & |
173 | returns DataMapOfStringString from TDataStd; |
174 | |
175 | ChangeStrings (me : mutable; |
176 | theStrings : DataMapOfStringString from TDataStd); |
177 | ---Purpose: Replace the container content by new content of the <theStrings>. |
178 | |
179 | |
180 | ---Category: Bytes (unsigned chars) |
181 | -- ====================== |
182 | |
183 | HasBytes (me) |
184 | ---Purpose: Returns true if there are some named bytes in the attribute. |
185 | ---C++: inline |
186 | returns Boolean from Standard; |
187 | |
188 | HasByte (me; |
189 | theName : ExtendedString from TCollection) |
190 | ---Purpose: Returns true if the attribute contains this named byte. |
191 | returns Boolean from Standard; |
192 | |
193 | GetByte (me : mutable; |
194 | theName : ExtendedString from TCollection) |
195 | ---Purpose: Returns the named byte. |
196 | -- It returns 0 if there is no such a named byte |
197 | -- (use HasByte()). |
198 | returns Byte from Standard; |
199 | |
200 | SetByte (me : mutable; |
201 | theName : ExtendedString from TCollection; |
202 | theByte : Byte from Standard); |
203 | ---Purpose: Defines a named byte. |
204 | -- If the byte already exists, it changes its value to <theByte>. |
205 | |
206 | GetBytesContainer (me : mutable) |
207 | ---Purpose: Returns the internal container of named bytes. |
208 | ---C++: return const & |
209 | returns DataMapOfStringByte from TDataStd; |
210 | |
211 | ChangeBytes (me : mutable; |
212 | theBytes : DataMapOfStringByte from TDataStd); |
213 | ---Purpose: Replace the container content by new content of the <theBytes>. |
214 | |
215 | |
216 | ---Category: Arrays of integers |
217 | -- ================== |
218 | |
219 | HasArraysOfIntegers (me) |
220 | ---Purpose: Returns true if there are some named arrays of integer values in the attribute. |
221 | ---C++: inline |
222 | returns Boolean from Standard; |
223 | |
224 | HasArrayOfIntegers (me; |
225 | theName : ExtendedString from TCollection) |
226 | ---Purpose: Returns true if the attribute contains this named array of integer values. |
227 | returns Boolean from Standard; |
228 | |
229 | GetArrayOfIntegers (me : mutable; |
230 | theName : ExtendedString from TCollection) |
231 | ---Purpose: Returns the named array of integer values. |
232 | -- It returns a NULL Handle if there is no such a named array of integers |
233 | -- (use HasArrayOfIntegers()). |
234 | ---C++: return const & |
235 | returns HArray1OfInteger from TColStd; |
236 | |
237 | SetArrayOfIntegers (me : mutable; |
238 | theName : ExtendedString from TCollection; |
239 | theArrayOfIntegers : HArray1OfInteger from TColStd); |
240 | ---Purpose: Defines a named array of integer values. |
241 | -- If the array already exists, it changes its value to <theArrayOfIntegers>. |
242 | |
243 | GetArraysOfIntegersContainer (me : mutable) |
244 | ---Purpose: Returns the internal container of named arrays of integer values. |
245 | ---C++: return const & |
246 | returns DataMapOfStringHArray1OfInteger from TDataStd; |
247 | |
248 | ChangeArraysOfIntegers (me : mutable; |
249 | theArraysOfIntegers : DataMapOfStringHArray1OfInteger from TDataStd); |
250 | ---Purpose: Replace the container content by new content of the <theArraysOfIntegers>. |
251 | |
252 | |
253 | ---Category: Arrays of reals |
254 | -- =============== |
255 | |
256 | HasArraysOfReals (me) |
257 | ---Purpose: Returns true if there are some named arrays of real values in the attribute. |
258 | ---C++: inline |
259 | returns Boolean from Standard; |
260 | |
261 | HasArrayOfReals (me; |
262 | theName : ExtendedString from TCollection) |
263 | ---Purpose: Returns true if the attribute contains this named array of real values. |
264 | returns Boolean from Standard; |
265 | |
266 | GetArrayOfReals (me : mutable; |
267 | theName : ExtendedString from TCollection) |
268 | ---Purpose: Returns the named array of real values. |
269 | -- It returns a NULL Handle if there is no such a named array of reals |
270 | -- (use HasArrayOfReals()). |
271 | ---C++: return const & |
272 | returns HArray1OfReal from TColStd; |
273 | |
274 | SetArrayOfReals (me : mutable; |
275 | theName : ExtendedString from TCollection; |
276 | theArrayOfReals : HArray1OfReal from TColStd); |
277 | ---Purpose: Defines a named array of real values. |
278 | -- If the array already exists, it changes its value to <theArrayOfReals>. |
279 | |
280 | GetArraysOfRealsContainer (me : mutable) |
281 | ---Purpose: Returns the internal container of named arrays of real values. |
282 | ---C++: return const & |
283 | returns DataMapOfStringHArray1OfReal from TDataStd; |
284 | |
285 | ChangeArraysOfReals (me : mutable; |
286 | theArraysOfReals : DataMapOfStringHArray1OfReal from TDataStd); |
287 | ---Purpose: Replace the container content by new content of the <theArraysOfReals>. |
288 | |
289 | |
290 | ---Category: Methodes of TDF_Attribute |
291 | -- ========================= |
292 | |
293 | ID (me) |
294 | ---C++: return const & |
295 | returns GUID from Standard; |
296 | |
297 | Restore (me: mutable; With : Attribute from TDF); |
298 | |
299 | NewEmpty (me) |
6e33d3ce |
300 | returns Attribute from TDF; |
7fd59977 |
301 | |
6e33d3ce |
302 | Paste (me; Into : Attribute from TDF; |
303 | RT : RelocationTable from TDF); |
7fd59977 |
304 | |
305 | Dump(me; anOS : in out OStream from Standard) |
306 | returns OStream from Standard |
307 | is redefined; |
308 | ---C++: return & |
309 | |
310 | |
311 | fields |
312 | |
313 | myIntegers : HDataMapOfStringInteger from TDataStd; |
314 | myReals : HDataMapOfStringReal from TDataStd; |
315 | myStrings : HDataMapOfStringString from TDataStd; |
316 | myBytes : HDataMapOfStringByte from TDataStd; |
317 | |
318 | myArraysOfIntegers : HDataMapOfStringHArray1OfInteger from TDataStd; |
319 | myArraysOfReals : HDataMapOfStringHArray1OfReal from TDataStd; |
320 | |
321 | end NamedData; |