1 -- Created on: 2007-05-29
2 -- Created by: Vlad Romashko
3 -- Copyright (c) 2007-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
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
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.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class NamedData from TDataStd inherits Attribute from TDF
18 ---Purpose: Contains a named data.
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
44 ---Purpose: Static methods
48 ---C++: return const &
49 ---Purpose: Returns the ID of the named data attribute.
50 returns GUID from Standard;
52 Set (myclass; label : Label from TDF)
53 ---Purpose: Finds or creates a named data attribute.
54 returns NamedData from TDataStd;
57 ---Category: NamedData methods
61 returns NamedData from TDataStd;
68 ---Purpose: Returns true if at least one named integer value is
69 -- kept in the attribute.
71 returns Boolean from Standard;
74 theName : ExtendedString from TCollection)
75 ---Purpose: Returns true if the attribute contains specified by Name
77 returns Boolean from Standard;
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;
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;
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>.
97 GetIntegersContainer (me : mutable)
98 ---Purpose: Returns the internal container of named integers.
99 ---C++: return const &
100 returns DataMapOfStringInteger from TColStd;
102 ChangeIntegers (me : mutable;
103 theIntegers : DataMapOfStringInteger from TColStd);
104 ---Purpose: Replace the container content by new content of the <theIntegers>.
111 ---Purpose: Returns true if at least one named real value is
112 -- kept in the attribute.
114 returns Boolean from Standard;
117 theName : ExtendedString from TCollection)
118 ---Purpose: Returns true if the attribute contains a real specified by Name.
119 returns Boolean from Standard;
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
126 returns Real from Standard;
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>.
134 GetRealsContainer (me: mutable)
135 ---Purpose: Returns the internal container of named reals.
136 ---C++: return const &
137 returns DataMapOfStringReal from TDataStd;
139 ChangeReals (me : mutable;
140 theReals : DataMapOfStringReal from TDataStd);
141 ---Purpose: Replace the container content by new content of the <theReals>.
147 ---Purpose: Returns true if there are some named strings in the attribute.
149 returns Boolean from Standard;
152 theName : ExtendedString from TCollection)
153 ---Purpose: Returns true if the attribute contains this named string.
154 returns Boolean from Standard;
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;
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>.
170 GetStringsContainer (me : mutable)
171 ---Purpose: Returns the internal container of named strings.
172 ---C++: return const &
173 returns DataMapOfStringString from TDataStd;
175 ChangeStrings (me : mutable;
176 theStrings : DataMapOfStringString from TDataStd);
177 ---Purpose: Replace the container content by new content of the <theStrings>.
180 ---Category: Bytes (unsigned chars)
181 -- ======================
184 ---Purpose: Returns true if there are some named bytes in the attribute.
186 returns Boolean from Standard;
189 theName : ExtendedString from TCollection)
190 ---Purpose: Returns true if the attribute contains this named byte.
191 returns Boolean from Standard;
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
198 returns Byte from Standard;
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>.
206 GetBytesContainer (me : mutable)
207 ---Purpose: Returns the internal container of named bytes.
208 ---C++: return const &
209 returns DataMapOfStringByte from TDataStd;
211 ChangeBytes (me : mutable;
212 theBytes : DataMapOfStringByte from TDataStd);
213 ---Purpose: Replace the container content by new content of the <theBytes>.
216 ---Category: Arrays of integers
217 -- ==================
219 HasArraysOfIntegers (me)
220 ---Purpose: Returns true if there are some named arrays of integer values in the attribute.
222 returns Boolean from Standard;
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;
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;
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>.
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;
248 ChangeArraysOfIntegers (me : mutable;
249 theArraysOfIntegers : DataMapOfStringHArray1OfInteger from TDataStd);
250 ---Purpose: Replace the container content by new content of the <theArraysOfIntegers>.
253 ---Category: Arrays of reals
256 HasArraysOfReals (me)
257 ---Purpose: Returns true if there are some named arrays of real values in the attribute.
259 returns Boolean from Standard;
262 theName : ExtendedString from TCollection)
263 ---Purpose: Returns true if the attribute contains this named array of real values.
264 returns Boolean from Standard;
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;
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>.
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;
285 ChangeArraysOfReals (me : mutable;
286 theArraysOfReals : DataMapOfStringHArray1OfReal from TDataStd);
287 ---Purpose: Replace the container content by new content of the <theArraysOfReals>.
290 ---Category: Methodes of TDF_Attribute
291 -- =========================
294 ---C++: return const &
295 returns GUID from Standard;
297 Restore (me: mutable; With : Attribute from TDF);
300 returns Attribute from TDF;
302 Paste (me; Into : Attribute from TDF;
303 RT : RelocationTable from TDF);
305 Dump(me; anOS : in out OStream from Standard)
306 returns OStream from Standard
313 myIntegers : HDataMapOfStringInteger from TDataStd;
314 myReals : HDataMapOfStringReal from TDataStd;
315 myStrings : HDataMapOfStringString from TDataStd;
316 myBytes : HDataMapOfStringByte from TDataStd;
318 myArraysOfIntegers : HDataMapOfStringHArray1OfInteger from TDataStd;
319 myArraysOfReals : HDataMapOfStringHArray1OfReal from TDataStd;