973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <IGESData_DirChecker.hxx> |
16 | #include <IGESData_IGESEntity.hxx> |
7fd59977 |
17 | #include <IGESDimen_AngularDimension.hxx> |
18 | #include <IGESDimen_BasicDimension.hxx> |
19 | #include <IGESDimen_CenterLine.hxx> |
20 | #include <IGESDimen_CurveDimension.hxx> |
21 | #include <IGESDimen_DiameterDimension.hxx> |
22 | #include <IGESDimen_DimensionDisplayData.hxx> |
42cf5bc1 |
23 | #include <IGESDimen_DimensionedGeometry.hxx> |
7fd59977 |
24 | #include <IGESDimen_DimensionTolerance.hxx> |
25 | #include <IGESDimen_DimensionUnits.hxx> |
7fd59977 |
26 | #include <IGESDimen_FlagNote.hxx> |
27 | #include <IGESDimen_GeneralLabel.hxx> |
42cf5bc1 |
28 | #include <IGESDimen_GeneralModule.hxx> |
7fd59977 |
29 | #include <IGESDimen_GeneralNote.hxx> |
30 | #include <IGESDimen_GeneralSymbol.hxx> |
31 | #include <IGESDimen_LeaderArrow.hxx> |
32 | #include <IGESDimen_LinearDimension.hxx> |
33 | #include <IGESDimen_NewDimensionedGeometry.hxx> |
34 | #include <IGESDimen_NewGeneralNote.hxx> |
35 | #include <IGESDimen_OrdinateDimension.hxx> |
36 | #include <IGESDimen_PointDimension.hxx> |
37 | #include <IGESDimen_RadiusDimension.hxx> |
38 | #include <IGESDimen_Section.hxx> |
39 | #include <IGESDimen_SectionedArea.hxx> |
7fd59977 |
40 | #include <IGESDimen_ToolAngularDimension.hxx> |
41 | #include <IGESDimen_ToolBasicDimension.hxx> |
42 | #include <IGESDimen_ToolCenterLine.hxx> |
43 | #include <IGESDimen_ToolCurveDimension.hxx> |
44 | #include <IGESDimen_ToolDiameterDimension.hxx> |
45 | #include <IGESDimen_ToolDimensionDisplayData.hxx> |
42cf5bc1 |
46 | #include <IGESDimen_ToolDimensionedGeometry.hxx> |
7fd59977 |
47 | #include <IGESDimen_ToolDimensionTolerance.hxx> |
48 | #include <IGESDimen_ToolDimensionUnits.hxx> |
7fd59977 |
49 | #include <IGESDimen_ToolFlagNote.hxx> |
50 | #include <IGESDimen_ToolGeneralLabel.hxx> |
51 | #include <IGESDimen_ToolGeneralNote.hxx> |
52 | #include <IGESDimen_ToolGeneralSymbol.hxx> |
53 | #include <IGESDimen_ToolLeaderArrow.hxx> |
54 | #include <IGESDimen_ToolLinearDimension.hxx> |
55 | #include <IGESDimen_ToolNewDimensionedGeometry.hxx> |
56 | #include <IGESDimen_ToolNewGeneralNote.hxx> |
57 | #include <IGESDimen_ToolOrdinateDimension.hxx> |
58 | #include <IGESDimen_ToolPointDimension.hxx> |
59 | #include <IGESDimen_ToolRadiusDimension.hxx> |
60 | #include <IGESDimen_ToolSection.hxx> |
61 | #include <IGESDimen_ToolSectionedArea.hxx> |
62 | #include <IGESDimen_ToolWitnessLine.hxx> |
42cf5bc1 |
63 | #include <IGESDimen_WitnessLine.hxx> |
64 | #include <Interface_Category.hxx> |
65 | #include <Interface_Check.hxx> |
66 | #include <Interface_CopyTool.hxx> |
67 | #include <Interface_EntityIterator.hxx> |
68 | #include <Interface_Macros.hxx> |
69 | #include <Interface_ShareTool.hxx> |
70 | #include <Standard_Transient.hxx> |
71 | #include <Standard_Type.hxx> |
7fd59977 |
72 | |
92efcf78 |
73 | IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_GeneralModule,IGESData_GeneralModule) |
74 | |
0177fe26 |
75 | // Each Module is attached to a Protocol : it must interpret Case Numbers |
7fd59977 |
76 | // (arguments <CN> of various methods) in accordance to values returned by |
77 | // the method TypeNumber from this Protocol |
b311480e |
78 | IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } |
7fd59977 |
79 | |
80 | |
81 | void IGESDimen_GeneralModule::OwnSharedCase |
82 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, |
83 | Interface_EntityIterator& iter) const |
84 | { |
85 | switch (CN) { |
86 | case 1 : { |
87 | DeclareAndCast(IGESDimen_AngularDimension,anent,ent); |
88 | if (anent.IsNull()) return; |
89 | IGESDimen_ToolAngularDimension tool; |
90 | tool.OwnShared(anent,iter); |
91 | } |
92 | break; |
93 | case 2 : { |
94 | DeclareAndCast(IGESDimen_BasicDimension,anent,ent); |
95 | if (anent.IsNull()) return; |
96 | IGESDimen_ToolBasicDimension tool; |
97 | tool.OwnShared(anent,iter); |
98 | } |
99 | break; |
100 | case 3 : { |
101 | DeclareAndCast(IGESDimen_CenterLine,anent,ent); |
102 | if (anent.IsNull()) return; |
103 | IGESDimen_ToolCenterLine tool; |
104 | tool.OwnShared(anent,iter); |
105 | } |
106 | break; |
107 | case 4 : { |
108 | DeclareAndCast(IGESDimen_CurveDimension,anent,ent); |
109 | if (anent.IsNull()) return; |
110 | IGESDimen_ToolCurveDimension tool; |
111 | tool.OwnShared(anent,iter); |
112 | } |
113 | break; |
114 | case 5 : { |
115 | DeclareAndCast(IGESDimen_DiameterDimension,anent,ent); |
116 | if (anent.IsNull()) return; |
117 | IGESDimen_ToolDiameterDimension tool; |
118 | tool.OwnShared(anent,iter); |
119 | } |
120 | break; |
121 | case 6 : { |
122 | DeclareAndCast(IGESDimen_DimensionDisplayData,anent,ent); |
123 | if (anent.IsNull()) return; |
124 | IGESDimen_ToolDimensionDisplayData tool; |
125 | tool.OwnShared(anent,iter); |
126 | } |
127 | break; |
128 | case 7 : { |
129 | DeclareAndCast(IGESDimen_DimensionTolerance,anent,ent); |
130 | if (anent.IsNull()) return; |
131 | IGESDimen_ToolDimensionTolerance tool; |
132 | tool.OwnShared(anent,iter); |
133 | } |
134 | break; |
135 | case 8 : { |
136 | DeclareAndCast(IGESDimen_DimensionUnits,anent,ent); |
137 | if (anent.IsNull()) return; |
138 | IGESDimen_ToolDimensionUnits tool; |
139 | tool.OwnShared(anent,iter); |
140 | } |
141 | break; |
142 | case 9 : { |
143 | DeclareAndCast(IGESDimen_DimensionedGeometry,anent,ent); |
144 | if (anent.IsNull()) return; |
145 | IGESDimen_ToolDimensionedGeometry tool; |
146 | tool.OwnShared(anent,iter); |
147 | } |
148 | break; |
149 | case 10 : { |
150 | DeclareAndCast(IGESDimen_FlagNote,anent,ent); |
151 | if (anent.IsNull()) return; |
152 | IGESDimen_ToolFlagNote tool; |
153 | tool.OwnShared(anent,iter); |
154 | } |
155 | break; |
156 | case 11 : { |
157 | DeclareAndCast(IGESDimen_GeneralLabel,anent,ent); |
158 | if (anent.IsNull()) return; |
159 | IGESDimen_ToolGeneralLabel tool; |
160 | tool.OwnShared(anent,iter); |
161 | } |
162 | break; |
163 | case 12 : { |
164 | DeclareAndCast(IGESDimen_GeneralNote,anent,ent); |
165 | if (anent.IsNull()) return; |
166 | IGESDimen_ToolGeneralNote tool; |
167 | tool.OwnShared(anent,iter); |
168 | } |
169 | break; |
170 | case 13 : { |
171 | DeclareAndCast(IGESDimen_GeneralSymbol,anent,ent); |
172 | if (anent.IsNull()) return; |
173 | IGESDimen_ToolGeneralSymbol tool; |
174 | tool.OwnShared(anent,iter); |
175 | } |
176 | break; |
177 | case 14 : { |
178 | DeclareAndCast(IGESDimen_LeaderArrow,anent,ent); |
179 | if (anent.IsNull()) return; |
180 | IGESDimen_ToolLeaderArrow tool; |
181 | tool.OwnShared(anent,iter); |
182 | } |
183 | break; |
184 | case 15 : { |
185 | DeclareAndCast(IGESDimen_LinearDimension,anent,ent); |
186 | if (anent.IsNull()) return; |
187 | IGESDimen_ToolLinearDimension tool; |
188 | tool.OwnShared(anent,iter); |
189 | } |
190 | break; |
191 | case 16 : { |
192 | DeclareAndCast(IGESDimen_NewDimensionedGeometry,anent,ent); |
193 | if (anent.IsNull()) return; |
194 | IGESDimen_ToolNewDimensionedGeometry tool; |
195 | tool.OwnShared(anent,iter); |
196 | } |
197 | break; |
198 | case 17 : { |
199 | DeclareAndCast(IGESDimen_NewGeneralNote,anent,ent); |
200 | if (anent.IsNull()) return; |
201 | IGESDimen_ToolNewGeneralNote tool; |
202 | tool.OwnShared(anent,iter); |
203 | } |
204 | break; |
205 | case 18 : { |
206 | DeclareAndCast(IGESDimen_OrdinateDimension,anent,ent); |
207 | if (anent.IsNull()) return; |
208 | IGESDimen_ToolOrdinateDimension tool; |
209 | tool.OwnShared(anent,iter); |
210 | } |
211 | break; |
212 | case 19 : { |
213 | DeclareAndCast(IGESDimen_PointDimension,anent,ent); |
214 | if (anent.IsNull()) return; |
215 | IGESDimen_ToolPointDimension tool; |
216 | tool.OwnShared(anent,iter); |
217 | } |
218 | break; |
219 | case 20 : { |
220 | DeclareAndCast(IGESDimen_RadiusDimension,anent,ent); |
221 | if (anent.IsNull()) return; |
222 | IGESDimen_ToolRadiusDimension tool; |
223 | tool.OwnShared(anent,iter); |
224 | } |
225 | break; |
226 | case 21 : { |
227 | DeclareAndCast(IGESDimen_Section,anent,ent); |
228 | if (anent.IsNull()) return; |
229 | IGESDimen_ToolSection tool; |
230 | tool.OwnShared(anent,iter); |
231 | } |
232 | break; |
233 | case 22 : { |
234 | DeclareAndCast(IGESDimen_SectionedArea,anent,ent); |
235 | if (anent.IsNull()) return; |
236 | IGESDimen_ToolSectionedArea tool; |
237 | tool.OwnShared(anent,iter); |
238 | } |
239 | break; |
240 | case 23 : { |
241 | DeclareAndCast(IGESDimen_WitnessLine,anent,ent); |
242 | if (anent.IsNull()) return; |
243 | IGESDimen_ToolWitnessLine tool; |
244 | tool.OwnShared(anent,iter); |
245 | } |
246 | break; |
247 | default : break; |
248 | } |
249 | } |
250 | |
251 | |
252 | IGESData_DirChecker IGESDimen_GeneralModule::DirChecker |
253 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const |
254 | { |
255 | switch (CN) { |
256 | case 1 : { |
257 | DeclareAndCast(IGESDimen_AngularDimension,anent,ent); |
258 | if (anent.IsNull()) break; |
259 | IGESDimen_ToolAngularDimension tool; |
260 | return tool.DirChecker(anent); |
261 | } |
262 | case 2 : { |
263 | DeclareAndCast(IGESDimen_BasicDimension,anent,ent); |
264 | if (anent.IsNull()) break; |
265 | IGESDimen_ToolBasicDimension tool; |
266 | return tool.DirChecker(anent); |
267 | } |
268 | case 3 : { |
269 | DeclareAndCast(IGESDimen_CenterLine,anent,ent); |
270 | if (anent.IsNull()) break; |
271 | IGESDimen_ToolCenterLine tool; |
272 | return tool.DirChecker(anent); |
273 | } |
274 | case 4 : { |
275 | DeclareAndCast(IGESDimen_CurveDimension,anent,ent); |
276 | if (anent.IsNull()) break; |
277 | IGESDimen_ToolCurveDimension tool; |
278 | return tool.DirChecker(anent); |
279 | } |
280 | case 5 : { |
281 | DeclareAndCast(IGESDimen_DiameterDimension,anent,ent); |
282 | if (anent.IsNull()) break; |
283 | IGESDimen_ToolDiameterDimension tool; |
284 | return tool.DirChecker(anent); |
285 | } |
286 | case 6 : { |
287 | DeclareAndCast(IGESDimen_DimensionDisplayData,anent,ent); |
288 | if (anent.IsNull()) break; |
289 | IGESDimen_ToolDimensionDisplayData tool; |
290 | return tool.DirChecker(anent); |
291 | } |
292 | case 7 : { |
293 | DeclareAndCast(IGESDimen_DimensionTolerance,anent,ent); |
294 | if (anent.IsNull()) break; |
295 | IGESDimen_ToolDimensionTolerance tool; |
296 | return tool.DirChecker(anent); |
297 | } |
298 | case 8 : { |
299 | DeclareAndCast(IGESDimen_DimensionUnits,anent,ent); |
300 | if (anent.IsNull()) break; |
301 | IGESDimen_ToolDimensionUnits tool; |
302 | return tool.DirChecker(anent); |
303 | } |
304 | case 9 : { |
305 | DeclareAndCast(IGESDimen_DimensionedGeometry,anent,ent); |
306 | if (anent.IsNull()) break; |
307 | IGESDimen_ToolDimensionedGeometry tool; |
308 | return tool.DirChecker(anent); |
309 | } |
310 | case 10 : { |
311 | DeclareAndCast(IGESDimen_FlagNote,anent,ent); |
312 | if (anent.IsNull()) break; |
313 | IGESDimen_ToolFlagNote tool; |
314 | return tool.DirChecker(anent); |
315 | } |
316 | case 11 : { |
317 | DeclareAndCast(IGESDimen_GeneralLabel,anent,ent); |
318 | if (anent.IsNull()) break; |
319 | IGESDimen_ToolGeneralLabel tool; |
320 | return tool.DirChecker(anent); |
321 | } |
322 | case 12 : { |
323 | DeclareAndCast(IGESDimen_GeneralNote,anent,ent); |
324 | if (anent.IsNull()) break; |
325 | IGESDimen_ToolGeneralNote tool; |
326 | return tool.DirChecker(anent); |
327 | } |
328 | case 13 : { |
329 | DeclareAndCast(IGESDimen_GeneralSymbol,anent,ent); |
330 | if (anent.IsNull()) break; |
331 | IGESDimen_ToolGeneralSymbol tool; |
332 | return tool.DirChecker(anent); |
333 | } |
334 | case 14 : { |
335 | DeclareAndCast(IGESDimen_LeaderArrow,anent,ent); |
336 | if (anent.IsNull()) break; |
337 | IGESDimen_ToolLeaderArrow tool; |
338 | return tool.DirChecker(anent); |
339 | } |
340 | case 15 : { |
341 | DeclareAndCast(IGESDimen_LinearDimension,anent,ent); |
342 | if (anent.IsNull()) break; |
343 | IGESDimen_ToolLinearDimension tool; |
344 | return tool.DirChecker(anent); |
345 | } |
346 | case 16 : { |
347 | DeclareAndCast(IGESDimen_NewDimensionedGeometry,anent,ent); |
348 | if (anent.IsNull()) break; |
349 | IGESDimen_ToolNewDimensionedGeometry tool; |
350 | return tool.DirChecker(anent); |
351 | } |
352 | case 17 : { |
353 | DeclareAndCast(IGESDimen_NewGeneralNote,anent,ent); |
354 | if (anent.IsNull()) break; |
355 | IGESDimen_ToolNewGeneralNote tool; |
356 | return tool.DirChecker(anent); |
357 | } |
358 | case 18 : { |
359 | DeclareAndCast(IGESDimen_OrdinateDimension,anent,ent); |
360 | if (anent.IsNull()) break; |
361 | IGESDimen_ToolOrdinateDimension tool; |
362 | return tool.DirChecker(anent); |
363 | } |
364 | case 19 : { |
365 | DeclareAndCast(IGESDimen_PointDimension,anent,ent); |
366 | if (anent.IsNull()) break; |
367 | IGESDimen_ToolPointDimension tool; |
368 | return tool.DirChecker(anent); |
369 | } |
370 | case 20 : { |
371 | DeclareAndCast(IGESDimen_RadiusDimension,anent,ent); |
372 | if (anent.IsNull()) break; |
373 | IGESDimen_ToolRadiusDimension tool; |
374 | return tool.DirChecker(anent); |
375 | } |
376 | case 21 : { |
377 | DeclareAndCast(IGESDimen_Section,anent,ent); |
378 | if (anent.IsNull()) break; |
379 | IGESDimen_ToolSection tool; |
380 | return tool.DirChecker(anent); |
381 | } |
382 | case 22 : { |
383 | DeclareAndCast(IGESDimen_SectionedArea,anent,ent); |
384 | if (anent.IsNull()) break; |
385 | IGESDimen_ToolSectionedArea tool; |
386 | return tool.DirChecker(anent); |
387 | } |
388 | case 23 : { |
389 | DeclareAndCast(IGESDimen_WitnessLine,anent,ent); |
390 | if (anent.IsNull()) break; |
391 | IGESDimen_ToolWitnessLine tool; |
392 | return tool.DirChecker(anent); |
393 | } |
394 | default : break; |
395 | } |
396 | return IGESData_DirChecker(); // by default, no specific criterium |
397 | } |
398 | |
399 | |
400 | void IGESDimen_GeneralModule::OwnCheckCase |
401 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, |
402 | const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const |
403 | { |
404 | switch (CN) { |
405 | case 1 : { |
406 | DeclareAndCast(IGESDimen_AngularDimension,anent,ent); |
407 | if (anent.IsNull()) return; |
408 | IGESDimen_ToolAngularDimension tool; |
409 | tool.OwnCheck(anent,shares,ach); |
410 | } |
411 | break; |
412 | case 2 : { |
413 | DeclareAndCast(IGESDimen_BasicDimension,anent,ent); |
414 | if (anent.IsNull()) return; |
415 | IGESDimen_ToolBasicDimension tool; |
416 | tool.OwnCheck(anent,shares,ach); |
417 | } |
418 | break; |
419 | case 3 : { |
420 | DeclareAndCast(IGESDimen_CenterLine,anent,ent); |
421 | if (anent.IsNull()) return; |
422 | IGESDimen_ToolCenterLine tool; |
423 | tool.OwnCheck(anent,shares,ach); |
424 | } |
425 | break; |
426 | case 4 : { |
427 | DeclareAndCast(IGESDimen_CurveDimension,anent,ent); |
428 | if (anent.IsNull()) return; |
429 | IGESDimen_ToolCurveDimension tool; |
430 | tool.OwnCheck(anent,shares,ach); |
431 | } |
432 | break; |
433 | case 5 : { |
434 | DeclareAndCast(IGESDimen_DiameterDimension,anent,ent); |
435 | if (anent.IsNull()) return; |
436 | IGESDimen_ToolDiameterDimension tool; |
437 | tool.OwnCheck(anent,shares,ach); |
438 | } |
439 | break; |
440 | case 6 : { |
441 | DeclareAndCast(IGESDimen_DimensionDisplayData,anent,ent); |
442 | if (anent.IsNull()) return; |
443 | IGESDimen_ToolDimensionDisplayData tool; |
444 | tool.OwnCheck(anent,shares,ach); |
445 | } |
446 | break; |
447 | case 7 : { |
448 | DeclareAndCast(IGESDimen_DimensionTolerance,anent,ent); |
449 | if (anent.IsNull()) return; |
450 | IGESDimen_ToolDimensionTolerance tool; |
451 | tool.OwnCheck(anent,shares,ach); |
452 | } |
453 | break; |
454 | case 8 : { |
455 | DeclareAndCast(IGESDimen_DimensionUnits,anent,ent); |
456 | if (anent.IsNull()) return; |
457 | IGESDimen_ToolDimensionUnits tool; |
458 | tool.OwnCheck(anent,shares,ach); |
459 | } |
460 | break; |
461 | case 9 : { |
462 | DeclareAndCast(IGESDimen_DimensionedGeometry,anent,ent); |
463 | if (anent.IsNull()) return; |
464 | IGESDimen_ToolDimensionedGeometry tool; |
465 | tool.OwnCheck(anent,shares,ach); |
466 | } |
467 | break; |
468 | case 10 : { |
469 | DeclareAndCast(IGESDimen_FlagNote,anent,ent); |
470 | if (anent.IsNull()) return; |
471 | IGESDimen_ToolFlagNote tool; |
472 | tool.OwnCheck(anent,shares,ach); |
473 | } |
474 | break; |
475 | case 11 : { |
476 | DeclareAndCast(IGESDimen_GeneralLabel,anent,ent); |
477 | if (anent.IsNull()) return; |
478 | IGESDimen_ToolGeneralLabel tool; |
479 | tool.OwnCheck(anent,shares,ach); |
480 | } |
481 | break; |
482 | case 12 : { |
483 | DeclareAndCast(IGESDimen_GeneralNote,anent,ent); |
484 | if (anent.IsNull()) return; |
485 | IGESDimen_ToolGeneralNote tool; |
486 | tool.OwnCheck(anent,shares,ach); |
487 | } |
488 | break; |
489 | case 13 : { |
490 | DeclareAndCast(IGESDimen_GeneralSymbol,anent,ent); |
491 | if (anent.IsNull()) return; |
492 | IGESDimen_ToolGeneralSymbol tool; |
493 | tool.OwnCheck(anent,shares,ach); |
494 | } |
495 | break; |
496 | case 14 : { |
497 | DeclareAndCast(IGESDimen_LeaderArrow,anent,ent); |
498 | if (anent.IsNull()) return; |
499 | IGESDimen_ToolLeaderArrow tool; |
500 | tool.OwnCheck(anent,shares,ach); |
501 | } |
502 | break; |
503 | case 15 : { |
504 | DeclareAndCast(IGESDimen_LinearDimension,anent,ent); |
505 | if (anent.IsNull()) return; |
506 | IGESDimen_ToolLinearDimension tool; |
507 | tool.OwnCheck(anent,shares,ach); |
508 | } |
509 | break; |
510 | case 16 : { |
511 | DeclareAndCast(IGESDimen_NewDimensionedGeometry,anent,ent); |
512 | if (anent.IsNull()) return; |
513 | IGESDimen_ToolNewDimensionedGeometry tool; |
514 | tool.OwnCheck(anent,shares,ach); |
515 | } |
516 | break; |
517 | case 17 : { |
518 | DeclareAndCast(IGESDimen_NewGeneralNote,anent,ent); |
519 | if (anent.IsNull()) return; |
520 | IGESDimen_ToolNewGeneralNote tool; |
521 | tool.OwnCheck(anent,shares,ach); |
522 | } |
523 | break; |
524 | case 18 : { |
525 | DeclareAndCast(IGESDimen_OrdinateDimension,anent,ent); |
526 | if (anent.IsNull()) return; |
527 | IGESDimen_ToolOrdinateDimension tool; |
528 | tool.OwnCheck(anent,shares,ach); |
529 | } |
530 | break; |
531 | case 19 : { |
532 | DeclareAndCast(IGESDimen_PointDimension,anent,ent); |
533 | if (anent.IsNull()) return; |
534 | IGESDimen_ToolPointDimension tool; |
535 | tool.OwnCheck(anent,shares,ach); |
536 | } |
537 | break; |
538 | case 20 : { |
539 | DeclareAndCast(IGESDimen_RadiusDimension,anent,ent); |
540 | if (anent.IsNull()) return; |
541 | IGESDimen_ToolRadiusDimension tool; |
542 | tool.OwnCheck(anent,shares,ach); |
543 | } |
544 | break; |
545 | case 21 : { |
546 | DeclareAndCast(IGESDimen_Section,anent,ent); |
547 | if (anent.IsNull()) return; |
548 | IGESDimen_ToolSection tool; |
549 | tool.OwnCheck(anent,shares,ach); |
550 | } |
551 | break; |
552 | case 22 : { |
553 | DeclareAndCast(IGESDimen_SectionedArea,anent,ent); |
554 | if (anent.IsNull()) return; |
555 | IGESDimen_ToolSectionedArea tool; |
556 | tool.OwnCheck(anent,shares,ach); |
557 | } |
558 | break; |
559 | case 23 : { |
560 | DeclareAndCast(IGESDimen_WitnessLine,anent,ent); |
561 | if (anent.IsNull()) return; |
562 | IGESDimen_ToolWitnessLine tool; |
563 | tool.OwnCheck(anent,shares,ach); |
564 | } |
565 | break; |
566 | default : break; |
567 | } |
568 | } |
569 | |
570 | |
571 | Standard_Boolean IGESDimen_GeneralModule::NewVoid |
572 | (const Standard_Integer CN, Handle(Standard_Transient)& ent) const |
573 | { |
574 | switch (CN) { |
575 | case 1 : ent = new IGESDimen_AngularDimension; break; |
576 | case 2 : ent = new IGESDimen_BasicDimension; break; |
577 | case 3 : ent = new IGESDimen_CenterLine; break; |
578 | case 4 : ent = new IGESDimen_CurveDimension; break; |
579 | case 5 : ent = new IGESDimen_DiameterDimension; break; |
580 | case 6 : ent = new IGESDimen_DimensionDisplayData; break; |
581 | case 7 : ent = new IGESDimen_DimensionTolerance; break; |
582 | case 8 : ent = new IGESDimen_DimensionUnits; break; |
583 | case 9 : ent = new IGESDimen_DimensionedGeometry; break; |
584 | case 10 : ent = new IGESDimen_FlagNote; break; |
585 | case 11 : ent = new IGESDimen_GeneralLabel; break; |
586 | case 12 : ent = new IGESDimen_GeneralNote; break; |
587 | case 13 : ent = new IGESDimen_GeneralSymbol; break; |
588 | case 14 : ent = new IGESDimen_LeaderArrow; break; |
589 | case 15 : ent = new IGESDimen_LinearDimension; break; |
590 | case 16 : ent = new IGESDimen_NewDimensionedGeometry; break; |
591 | case 17 : ent = new IGESDimen_NewGeneralNote; break; |
592 | case 18 : ent = new IGESDimen_OrdinateDimension; break; |
593 | case 19 : ent = new IGESDimen_PointDimension; break; |
594 | case 20 : ent = new IGESDimen_RadiusDimension; break; |
595 | case 21 : ent = new IGESDimen_Section; break; |
596 | case 22 : ent = new IGESDimen_SectionedArea; break; |
597 | case 23 : ent = new IGESDimen_WitnessLine; break; |
598 | default : return Standard_False; // by default, Failure on Recognize |
599 | } |
600 | return Standard_True; |
601 | } |
602 | |
603 | |
604 | void IGESDimen_GeneralModule::OwnCopyCase |
605 | (const Standard_Integer CN, |
606 | const Handle(IGESData_IGESEntity)& entfrom, |
607 | const Handle(IGESData_IGESEntity)& entto, |
608 | Interface_CopyTool& TC) const |
609 | { |
610 | switch (CN) { |
611 | case 1 : { |
612 | DeclareAndCast(IGESDimen_AngularDimension,enfr,entfrom); |
613 | DeclareAndCast(IGESDimen_AngularDimension,ento,entto); |
614 | IGESDimen_ToolAngularDimension tool; |
615 | tool.OwnCopy(enfr,ento,TC); |
616 | } |
617 | break; |
618 | case 2 : { |
619 | DeclareAndCast(IGESDimen_BasicDimension,enfr,entfrom); |
620 | DeclareAndCast(IGESDimen_BasicDimension,ento,entto); |
621 | IGESDimen_ToolBasicDimension tool; |
622 | tool.OwnCopy(enfr,ento,TC); |
623 | } |
624 | break; |
625 | case 3 : { |
626 | DeclareAndCast(IGESDimen_CenterLine,enfr,entfrom); |
627 | DeclareAndCast(IGESDimen_CenterLine,ento,entto); |
628 | IGESDimen_ToolCenterLine tool; |
629 | tool.OwnCopy(enfr,ento,TC); |
630 | } |
631 | break; |
632 | case 4 : { |
633 | DeclareAndCast(IGESDimen_CurveDimension,enfr,entfrom); |
634 | DeclareAndCast(IGESDimen_CurveDimension,ento,entto); |
635 | IGESDimen_ToolCurveDimension tool; |
636 | tool.OwnCopy(enfr,ento,TC); |
637 | } |
638 | break; |
639 | case 5 : { |
640 | DeclareAndCast(IGESDimen_DiameterDimension,enfr,entfrom); |
641 | DeclareAndCast(IGESDimen_DiameterDimension,ento,entto); |
642 | IGESDimen_ToolDiameterDimension tool; |
643 | tool.OwnCopy(enfr,ento,TC); |
644 | } |
645 | break; |
646 | case 6 : { |
647 | DeclareAndCast(IGESDimen_DimensionDisplayData,enfr,entfrom); |
648 | DeclareAndCast(IGESDimen_DimensionDisplayData,ento,entto); |
649 | IGESDimen_ToolDimensionDisplayData tool; |
650 | tool.OwnCopy(enfr,ento,TC); |
651 | } |
652 | break; |
653 | case 7 : { |
654 | DeclareAndCast(IGESDimen_DimensionTolerance,enfr,entfrom); |
655 | DeclareAndCast(IGESDimen_DimensionTolerance,ento,entto); |
656 | IGESDimen_ToolDimensionTolerance tool; |
657 | tool.OwnCopy(enfr,ento,TC); |
658 | } |
659 | break; |
660 | case 8 : { |
661 | DeclareAndCast(IGESDimen_DimensionUnits,enfr,entfrom); |
662 | DeclareAndCast(IGESDimen_DimensionUnits,ento,entto); |
663 | IGESDimen_ToolDimensionUnits tool; |
664 | tool.OwnCopy(enfr,ento,TC); |
665 | } |
666 | break; |
667 | case 9 : { |
668 | DeclareAndCast(IGESDimen_DimensionedGeometry,enfr,entfrom); |
669 | DeclareAndCast(IGESDimen_DimensionedGeometry,ento,entto); |
670 | IGESDimen_ToolDimensionedGeometry tool; |
671 | tool.OwnCopy(enfr,ento,TC); |
672 | } |
673 | break; |
674 | case 10 : { |
675 | DeclareAndCast(IGESDimen_FlagNote,enfr,entfrom); |
676 | DeclareAndCast(IGESDimen_FlagNote,ento,entto); |
677 | IGESDimen_ToolFlagNote tool; |
678 | tool.OwnCopy(enfr,ento,TC); |
679 | } |
680 | break; |
681 | case 11 : { |
682 | DeclareAndCast(IGESDimen_GeneralLabel,enfr,entfrom); |
683 | DeclareAndCast(IGESDimen_GeneralLabel,ento,entto); |
684 | IGESDimen_ToolGeneralLabel tool; |
685 | tool.OwnCopy(enfr,ento,TC); |
686 | } |
687 | break; |
688 | case 12 : { |
689 | DeclareAndCast(IGESDimen_GeneralNote,enfr,entfrom); |
690 | DeclareAndCast(IGESDimen_GeneralNote,ento,entto); |
691 | IGESDimen_ToolGeneralNote tool; |
692 | tool.OwnCopy(enfr,ento,TC); |
693 | } |
694 | break; |
695 | case 13 : { |
696 | DeclareAndCast(IGESDimen_GeneralSymbol,enfr,entfrom); |
697 | DeclareAndCast(IGESDimen_GeneralSymbol,ento,entto); |
698 | IGESDimen_ToolGeneralSymbol tool; |
699 | tool.OwnCopy(enfr,ento,TC); |
700 | } |
701 | break; |
702 | case 14 : { |
703 | DeclareAndCast(IGESDimen_LeaderArrow,enfr,entfrom); |
704 | DeclareAndCast(IGESDimen_LeaderArrow,ento,entto); |
705 | IGESDimen_ToolLeaderArrow tool; |
706 | tool.OwnCopy(enfr,ento,TC); |
707 | } |
708 | break; |
709 | case 15 : { |
710 | DeclareAndCast(IGESDimen_LinearDimension,enfr,entfrom); |
711 | DeclareAndCast(IGESDimen_LinearDimension,ento,entto); |
712 | IGESDimen_ToolLinearDimension tool; |
713 | tool.OwnCopy(enfr,ento,TC); |
714 | } |
715 | break; |
716 | case 16 : { |
717 | DeclareAndCast(IGESDimen_NewDimensionedGeometry,enfr,entfrom); |
718 | DeclareAndCast(IGESDimen_NewDimensionedGeometry,ento,entto); |
719 | IGESDimen_ToolNewDimensionedGeometry tool; |
720 | tool.OwnCopy(enfr,ento,TC); |
721 | } |
722 | break; |
723 | case 17 : { |
724 | DeclareAndCast(IGESDimen_NewGeneralNote,enfr,entfrom); |
725 | DeclareAndCast(IGESDimen_NewGeneralNote,ento,entto); |
726 | IGESDimen_ToolNewGeneralNote tool; |
727 | tool.OwnCopy(enfr,ento,TC); |
728 | } |
729 | break; |
730 | case 18 : { |
731 | DeclareAndCast(IGESDimen_OrdinateDimension,enfr,entfrom); |
732 | DeclareAndCast(IGESDimen_OrdinateDimension,ento,entto); |
733 | IGESDimen_ToolOrdinateDimension tool; |
734 | tool.OwnCopy(enfr,ento,TC); |
735 | } |
736 | break; |
737 | case 19 : { |
738 | DeclareAndCast(IGESDimen_PointDimension,enfr,entfrom); |
739 | DeclareAndCast(IGESDimen_PointDimension,ento,entto); |
740 | IGESDimen_ToolPointDimension tool; |
741 | tool.OwnCopy(enfr,ento,TC); |
742 | } |
743 | break; |
744 | case 20 : { |
745 | DeclareAndCast(IGESDimen_RadiusDimension,enfr,entfrom); |
746 | DeclareAndCast(IGESDimen_RadiusDimension,ento,entto); |
747 | IGESDimen_ToolRadiusDimension tool; |
748 | tool.OwnCopy(enfr,ento,TC); |
749 | } |
750 | break; |
751 | case 21 : { |
752 | DeclareAndCast(IGESDimen_Section,enfr,entfrom); |
753 | DeclareAndCast(IGESDimen_Section,ento,entto); |
754 | IGESDimen_ToolSection tool; |
755 | tool.OwnCopy(enfr,ento,TC); |
756 | } |
757 | break; |
758 | case 22 : { |
759 | DeclareAndCast(IGESDimen_SectionedArea,enfr,entfrom); |
760 | DeclareAndCast(IGESDimen_SectionedArea,ento,entto); |
761 | IGESDimen_ToolSectionedArea tool; |
762 | tool.OwnCopy(enfr,ento,TC); |
763 | } |
764 | break; |
765 | case 23 : { |
766 | DeclareAndCast(IGESDimen_WitnessLine,enfr,entfrom); |
767 | DeclareAndCast(IGESDimen_WitnessLine,ento,entto); |
768 | IGESDimen_ToolWitnessLine tool; |
769 | tool.OwnCopy(enfr,ento,TC); |
770 | } |
771 | break; |
772 | default : break; |
773 | } |
774 | } |
775 | |
776 | |
777 | Standard_Integer IGESDimen_GeneralModule::CategoryNumber |
35e08fe8 |
778 | (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& , |
7fd59977 |
779 | const Interface_ShareTool& ) const |
780 | { |
781 | return Interface_Category::Number("Drawing"); |
782 | } |