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 <IGESDraw_CircArraySubfigure.hxx> |
18 | #include <IGESDraw_ConnectPoint.hxx> |
19 | #include <IGESDraw_Drawing.hxx> |
20 | #include <IGESDraw_DrawingWithRotation.hxx> |
42cf5bc1 |
21 | #include <IGESDraw_GeneralModule.hxx> |
7fd59977 |
22 | #include <IGESDraw_LabelDisplay.hxx> |
23 | #include <IGESDraw_NetworkSubfigure.hxx> |
24 | #include <IGESDraw_NetworkSubfigureDef.hxx> |
25 | #include <IGESDraw_PerspectiveView.hxx> |
26 | #include <IGESDraw_Planar.hxx> |
27 | #include <IGESDraw_RectArraySubfigure.hxx> |
28 | #include <IGESDraw_SegmentedViewsVisible.hxx> |
7fd59977 |
29 | #include <IGESDraw_ToolCircArraySubfigure.hxx> |
30 | #include <IGESDraw_ToolConnectPoint.hxx> |
31 | #include <IGESDraw_ToolDrawing.hxx> |
32 | #include <IGESDraw_ToolDrawingWithRotation.hxx> |
33 | #include <IGESDraw_ToolLabelDisplay.hxx> |
34 | #include <IGESDraw_ToolNetworkSubfigure.hxx> |
35 | #include <IGESDraw_ToolNetworkSubfigureDef.hxx> |
36 | #include <IGESDraw_ToolPerspectiveView.hxx> |
37 | #include <IGESDraw_ToolPlanar.hxx> |
38 | #include <IGESDraw_ToolRectArraySubfigure.hxx> |
39 | #include <IGESDraw_ToolSegmentedViewsVisible.hxx> |
40 | #include <IGESDraw_ToolView.hxx> |
41 | #include <IGESDraw_ToolViewsVisible.hxx> |
42 | #include <IGESDraw_ToolViewsVisibleWithAttr.hxx> |
42cf5bc1 |
43 | #include <IGESDraw_View.hxx> |
44 | #include <IGESDraw_ViewsVisible.hxx> |
45 | #include <IGESDraw_ViewsVisibleWithAttr.hxx> |
46 | #include <Interface_Category.hxx> |
47 | #include <Interface_Check.hxx> |
48 | #include <Interface_CopyTool.hxx> |
49 | #include <Interface_EntityIterator.hxx> |
50 | #include <Interface_Macros.hxx> |
51 | #include <Interface_ShareTool.hxx> |
52 | #include <Standard_Transient.hxx> |
53 | #include <Standard_Type.hxx> |
7fd59977 |
54 | |
55 | // Each Module is attached to a Protocol : it must interprete Case Numbers |
56 | // (arguments <CN> of various methods) in accordance to values returned by |
57 | // the method TypeNumber from this Protocol |
b311480e |
58 | IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } |
7fd59977 |
59 | |
60 | |
61 | void IGESDraw_GeneralModule::OwnSharedCase |
62 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, |
63 | Interface_EntityIterator& iter) const |
64 | { |
65 | switch (CN) { |
66 | case 1 : { |
67 | DeclareAndCast(IGESDraw_CircArraySubfigure,anent,ent); |
68 | if (anent.IsNull()) return; |
69 | IGESDraw_ToolCircArraySubfigure tool; |
70 | tool.OwnShared(anent,iter); |
71 | } |
72 | break; |
73 | case 2 : { |
74 | DeclareAndCast(IGESDraw_ConnectPoint,anent,ent); |
75 | if (anent.IsNull()) return; |
76 | IGESDraw_ToolConnectPoint tool; |
77 | tool.OwnShared(anent,iter); |
78 | } |
79 | break; |
80 | case 3 : { |
81 | DeclareAndCast(IGESDraw_Drawing,anent,ent); |
82 | if (anent.IsNull()) return; |
83 | IGESDraw_ToolDrawing tool; |
84 | tool.OwnShared(anent,iter); |
85 | } |
86 | break; |
87 | case 4 : { |
88 | DeclareAndCast(IGESDraw_DrawingWithRotation,anent,ent); |
89 | if (anent.IsNull()) return; |
90 | IGESDraw_ToolDrawingWithRotation tool; |
91 | tool.OwnShared(anent,iter); |
92 | } |
93 | break; |
94 | case 5 : { |
95 | DeclareAndCast(IGESDraw_LabelDisplay,anent,ent); |
96 | if (anent.IsNull()) return; |
97 | IGESDraw_ToolLabelDisplay tool; |
98 | tool.OwnShared(anent,iter); |
99 | } |
100 | break; |
101 | case 6 : { |
102 | DeclareAndCast(IGESDraw_NetworkSubfigure,anent,ent); |
103 | if (anent.IsNull()) return; |
104 | IGESDraw_ToolNetworkSubfigure tool; |
105 | tool.OwnShared(anent,iter); |
106 | } |
107 | break; |
108 | case 7 : { |
109 | DeclareAndCast(IGESDraw_NetworkSubfigureDef,anent,ent); |
110 | if (anent.IsNull()) return; |
111 | IGESDraw_ToolNetworkSubfigureDef tool; |
112 | tool.OwnShared(anent,iter); |
113 | } |
114 | break; |
115 | case 8 : { |
116 | DeclareAndCast(IGESDraw_PerspectiveView,anent,ent); |
117 | if (anent.IsNull()) return; |
118 | IGESDraw_ToolPerspectiveView tool; |
119 | tool.OwnShared(anent,iter); |
120 | } |
121 | break; |
122 | case 9 : { |
123 | DeclareAndCast(IGESDraw_Planar,anent,ent); |
124 | if (anent.IsNull()) return; |
125 | IGESDraw_ToolPlanar tool; |
126 | tool.OwnShared(anent,iter); |
127 | } |
128 | break; |
129 | case 10 : { |
130 | DeclareAndCast(IGESDraw_RectArraySubfigure,anent,ent); |
131 | if (anent.IsNull()) return; |
132 | IGESDraw_ToolRectArraySubfigure tool; |
133 | tool.OwnShared(anent,iter); |
134 | } |
135 | break; |
136 | case 11 : { |
137 | DeclareAndCast(IGESDraw_SegmentedViewsVisible,anent,ent); |
138 | if (anent.IsNull()) return; |
139 | IGESDraw_ToolSegmentedViewsVisible tool; |
140 | tool.OwnShared(anent,iter); |
141 | } |
142 | break; |
143 | case 12 : { |
144 | DeclareAndCast(IGESDraw_View,anent,ent); |
145 | if (anent.IsNull()) return; |
146 | IGESDraw_ToolView tool; |
147 | tool.OwnShared(anent,iter); |
148 | } |
149 | break; |
150 | case 13 : { |
151 | DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); |
152 | if (anent.IsNull()) return; |
153 | IGESDraw_ToolViewsVisible tool; |
154 | tool.OwnShared(anent,iter); |
155 | } |
156 | break; |
157 | case 14 : { |
158 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); |
159 | if (anent.IsNull()) return; |
160 | IGESDraw_ToolViewsVisibleWithAttr tool; |
161 | tool.OwnShared(anent,iter); |
162 | } |
163 | break; |
164 | default : break; |
165 | } |
166 | } |
167 | |
168 | void IGESDraw_GeneralModule::OwnImpliedCase |
169 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, |
170 | Interface_EntityIterator& iter) const |
171 | { |
172 | switch (CN ) { |
173 | case 13 : { |
174 | DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); |
175 | if (anent.IsNull()) break; |
176 | IGESDraw_ToolViewsVisible tool; |
177 | tool.OwnImplied(anent,iter); |
178 | } |
179 | case 14 : { |
180 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); |
181 | if (anent.IsNull()) break; |
182 | IGESDraw_ToolViewsVisibleWithAttr tool; |
183 | tool.OwnImplied(anent,iter); |
184 | } |
185 | default : break; |
186 | } |
187 | } |
188 | |
189 | |
190 | |
191 | IGESData_DirChecker IGESDraw_GeneralModule::DirChecker |
192 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const |
193 | { |
194 | switch (CN) { |
195 | case 1 : { |
196 | DeclareAndCast(IGESDraw_CircArraySubfigure,anent,ent); |
197 | if (anent.IsNull()) break; |
198 | IGESDraw_ToolCircArraySubfigure tool; |
199 | return tool.DirChecker(anent); |
200 | } |
201 | case 2 : { |
202 | DeclareAndCast(IGESDraw_ConnectPoint,anent,ent); |
203 | if (anent.IsNull()) break; |
204 | IGESDraw_ToolConnectPoint tool; |
205 | return tool.DirChecker(anent); |
206 | } |
207 | case 3 : { |
208 | DeclareAndCast(IGESDraw_Drawing,anent,ent); |
209 | if (anent.IsNull()) break; |
210 | IGESDraw_ToolDrawing tool; |
211 | return tool.DirChecker(anent); |
212 | } |
213 | case 4 : { |
214 | DeclareAndCast(IGESDraw_DrawingWithRotation,anent,ent); |
215 | if (anent.IsNull()) break; |
216 | IGESDraw_ToolDrawingWithRotation tool; |
217 | return tool.DirChecker(anent); |
218 | } |
219 | case 5 : { |
220 | DeclareAndCast(IGESDraw_LabelDisplay,anent,ent); |
221 | if (anent.IsNull()) break; |
222 | IGESDraw_ToolLabelDisplay tool; |
223 | return tool.DirChecker(anent); |
224 | } |
225 | case 6 : { |
226 | DeclareAndCast(IGESDraw_NetworkSubfigure,anent,ent); |
227 | if (anent.IsNull()) break; |
228 | IGESDraw_ToolNetworkSubfigure tool; |
229 | return tool.DirChecker(anent); |
230 | } |
231 | case 7 : { |
232 | DeclareAndCast(IGESDraw_NetworkSubfigureDef,anent,ent); |
233 | if (anent.IsNull()) break; |
234 | IGESDraw_ToolNetworkSubfigureDef tool; |
235 | return tool.DirChecker(anent); |
236 | } |
237 | case 8 : { |
238 | DeclareAndCast(IGESDraw_PerspectiveView,anent,ent); |
239 | if (anent.IsNull()) break; |
240 | IGESDraw_ToolPerspectiveView tool; |
241 | return tool.DirChecker(anent); |
242 | } |
243 | case 9 : { |
244 | DeclareAndCast(IGESDraw_Planar,anent,ent); |
245 | if (anent.IsNull()) break; |
246 | IGESDraw_ToolPlanar tool; |
247 | return tool.DirChecker(anent); |
248 | } |
249 | case 10 : { |
250 | DeclareAndCast(IGESDraw_RectArraySubfigure,anent,ent); |
251 | if (anent.IsNull()) break; |
252 | IGESDraw_ToolRectArraySubfigure tool; |
253 | return tool.DirChecker(anent); |
254 | } |
255 | case 11 : { |
256 | DeclareAndCast(IGESDraw_SegmentedViewsVisible,anent,ent); |
257 | if (anent.IsNull()) break; |
258 | IGESDraw_ToolSegmentedViewsVisible tool; |
259 | return tool.DirChecker(anent); |
260 | } |
261 | case 12 : { |
262 | DeclareAndCast(IGESDraw_View,anent,ent); |
263 | if (anent.IsNull()) break; |
264 | IGESDraw_ToolView tool; |
265 | return tool.DirChecker(anent); |
266 | } |
267 | case 13 : { |
268 | DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); |
269 | if (anent.IsNull()) break; |
270 | IGESDraw_ToolViewsVisible tool; |
271 | return tool.DirChecker(anent); |
272 | } |
273 | case 14 : { |
274 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); |
275 | if (anent.IsNull()) break; |
276 | IGESDraw_ToolViewsVisibleWithAttr tool; |
277 | return tool.DirChecker(anent); |
278 | } |
279 | default : break; |
280 | } |
281 | return IGESData_DirChecker(); // by default, no specific criterium |
282 | } |
283 | |
284 | |
285 | void IGESDraw_GeneralModule::OwnCheckCase |
286 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, |
287 | const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const |
288 | { |
289 | switch (CN) { |
290 | case 1 : { |
291 | DeclareAndCast(IGESDraw_CircArraySubfigure,anent,ent); |
292 | if (anent.IsNull()) return; |
293 | IGESDraw_ToolCircArraySubfigure tool; |
294 | tool.OwnCheck(anent,shares,ach); |
295 | } |
296 | break; |
297 | case 2 : { |
298 | DeclareAndCast(IGESDraw_ConnectPoint,anent,ent); |
299 | if (anent.IsNull()) return; |
300 | IGESDraw_ToolConnectPoint tool; |
301 | tool.OwnCheck(anent,shares,ach); |
302 | } |
303 | break; |
304 | case 3 : { |
305 | DeclareAndCast(IGESDraw_Drawing,anent,ent); |
306 | if (anent.IsNull()) return; |
307 | IGESDraw_ToolDrawing tool; |
308 | tool.OwnCheck(anent,shares,ach); |
309 | } |
310 | break; |
311 | case 4 : { |
312 | DeclareAndCast(IGESDraw_DrawingWithRotation,anent,ent); |
313 | if (anent.IsNull()) return; |
314 | IGESDraw_ToolDrawingWithRotation tool; |
315 | tool.OwnCheck(anent,shares,ach); |
316 | } |
317 | break; |
318 | case 5 : { |
319 | DeclareAndCast(IGESDraw_LabelDisplay,anent,ent); |
320 | if (anent.IsNull()) return; |
321 | IGESDraw_ToolLabelDisplay tool; |
322 | tool.OwnCheck(anent,shares,ach); |
323 | } |
324 | break; |
325 | case 6 : { |
326 | DeclareAndCast(IGESDraw_NetworkSubfigure,anent,ent); |
327 | if (anent.IsNull()) return; |
328 | IGESDraw_ToolNetworkSubfigure tool; |
329 | tool.OwnCheck(anent,shares,ach); |
330 | } |
331 | break; |
332 | case 7 : { |
333 | DeclareAndCast(IGESDraw_NetworkSubfigureDef,anent,ent); |
334 | if (anent.IsNull()) return; |
335 | IGESDraw_ToolNetworkSubfigureDef tool; |
336 | tool.OwnCheck(anent,shares,ach); |
337 | } |
338 | break; |
339 | case 8 : { |
340 | DeclareAndCast(IGESDraw_PerspectiveView,anent,ent); |
341 | if (anent.IsNull()) return; |
342 | IGESDraw_ToolPerspectiveView tool; |
343 | tool.OwnCheck(anent,shares,ach); |
344 | } |
345 | break; |
346 | case 9 : { |
347 | DeclareAndCast(IGESDraw_Planar,anent,ent); |
348 | if (anent.IsNull()) return; |
349 | IGESDraw_ToolPlanar tool; |
350 | tool.OwnCheck(anent,shares,ach); |
351 | } |
352 | break; |
353 | case 10 : { |
354 | DeclareAndCast(IGESDraw_RectArraySubfigure,anent,ent); |
355 | if (anent.IsNull()) return; |
356 | IGESDraw_ToolRectArraySubfigure tool; |
357 | tool.OwnCheck(anent,shares,ach); |
358 | } |
359 | break; |
360 | case 11 : { |
361 | DeclareAndCast(IGESDraw_SegmentedViewsVisible,anent,ent); |
362 | if (anent.IsNull()) return; |
363 | IGESDraw_ToolSegmentedViewsVisible tool; |
364 | tool.OwnCheck(anent,shares,ach); |
365 | } |
366 | break; |
367 | case 12 : { |
368 | DeclareAndCast(IGESDraw_View,anent,ent); |
369 | if (anent.IsNull()) return; |
370 | IGESDraw_ToolView tool; |
371 | tool.OwnCheck(anent,shares,ach); |
372 | } |
373 | break; |
374 | case 13 : { |
375 | DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); |
376 | if (anent.IsNull()) return; |
377 | IGESDraw_ToolViewsVisible tool; |
378 | tool.OwnCheck(anent,shares,ach); |
379 | } |
380 | break; |
381 | case 14 : { |
382 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); |
383 | if (anent.IsNull()) return; |
384 | IGESDraw_ToolViewsVisibleWithAttr tool; |
385 | tool.OwnCheck(anent,shares,ach); |
386 | } |
387 | break; |
388 | default : break; |
389 | } |
390 | } |
391 | |
392 | |
393 | Standard_Boolean IGESDraw_GeneralModule::NewVoid |
394 | (const Standard_Integer CN, Handle(Standard_Transient)& ent) const |
395 | { |
396 | switch (CN) { |
397 | case 1 : ent = new IGESDraw_CircArraySubfigure; break; |
398 | case 2 : ent = new IGESDraw_ConnectPoint; break; |
399 | case 3 : ent = new IGESDraw_Drawing; break; |
400 | case 4 : ent = new IGESDraw_DrawingWithRotation; break; |
401 | case 5 : ent = new IGESDraw_LabelDisplay; break; |
402 | case 6 : ent = new IGESDraw_NetworkSubfigure; break; |
403 | case 7 : ent = new IGESDraw_NetworkSubfigureDef; break; |
404 | case 8 : ent = new IGESDraw_PerspectiveView; break; |
405 | case 9 : ent = new IGESDraw_Planar; break; |
406 | case 10 : ent = new IGESDraw_RectArraySubfigure; break; |
407 | case 11 : ent = new IGESDraw_SegmentedViewsVisible; break; |
408 | case 12 : ent = new IGESDraw_View; break; |
409 | case 13 : ent = new IGESDraw_ViewsVisible; break; |
410 | case 14 : ent = new IGESDraw_ViewsVisibleWithAttr; break; |
411 | default : return Standard_False; // by default, Failure on Recognize |
412 | } |
413 | return Standard_True; |
414 | } |
415 | |
416 | |
417 | void IGESDraw_GeneralModule::OwnCopyCase |
418 | (const Standard_Integer CN, |
419 | const Handle(IGESData_IGESEntity)& entfrom, |
420 | const Handle(IGESData_IGESEntity)& entto, |
421 | Interface_CopyTool& TC) const |
422 | { |
423 | switch (CN) { |
424 | case 1 : { |
425 | DeclareAndCast(IGESDraw_CircArraySubfigure,enfr,entfrom); |
426 | DeclareAndCast(IGESDraw_CircArraySubfigure,ento,entto); |
427 | IGESDraw_ToolCircArraySubfigure tool; |
428 | tool.OwnCopy(enfr,ento,TC); |
429 | } |
430 | break; |
431 | case 2 : { |
432 | DeclareAndCast(IGESDraw_ConnectPoint,enfr,entfrom); |
433 | DeclareAndCast(IGESDraw_ConnectPoint,ento,entto); |
434 | IGESDraw_ToolConnectPoint tool; |
435 | tool.OwnCopy(enfr,ento,TC); |
436 | } |
437 | break; |
438 | case 3 : { |
439 | DeclareAndCast(IGESDraw_Drawing,enfr,entfrom); |
440 | DeclareAndCast(IGESDraw_Drawing,ento,entto); |
441 | IGESDraw_ToolDrawing tool; |
442 | tool.OwnCopy(enfr,ento,TC); |
443 | } |
444 | break; |
445 | case 4 : { |
446 | DeclareAndCast(IGESDraw_DrawingWithRotation,enfr,entfrom); |
447 | DeclareAndCast(IGESDraw_DrawingWithRotation,ento,entto); |
448 | IGESDraw_ToolDrawingWithRotation tool; |
449 | tool.OwnCopy(enfr,ento,TC); |
450 | } |
451 | break; |
452 | case 5 : { |
453 | DeclareAndCast(IGESDraw_LabelDisplay,enfr,entfrom); |
454 | DeclareAndCast(IGESDraw_LabelDisplay,ento,entto); |
455 | IGESDraw_ToolLabelDisplay tool; |
456 | tool.OwnCopy(enfr,ento,TC); |
457 | } |
458 | break; |
459 | case 6 : { |
460 | DeclareAndCast(IGESDraw_NetworkSubfigure,enfr,entfrom); |
461 | DeclareAndCast(IGESDraw_NetworkSubfigure,ento,entto); |
462 | IGESDraw_ToolNetworkSubfigure tool; |
463 | tool.OwnCopy(enfr,ento,TC); |
464 | } |
465 | break; |
466 | case 7 : { |
467 | DeclareAndCast(IGESDraw_NetworkSubfigureDef,enfr,entfrom); |
468 | DeclareAndCast(IGESDraw_NetworkSubfigureDef,ento,entto); |
469 | IGESDraw_ToolNetworkSubfigureDef tool; |
470 | tool.OwnCopy(enfr,ento,TC); |
471 | } |
472 | break; |
473 | case 8 : { |
474 | DeclareAndCast(IGESDraw_PerspectiveView,enfr,entfrom); |
475 | DeclareAndCast(IGESDraw_PerspectiveView,ento,entto); |
476 | IGESDraw_ToolPerspectiveView tool; |
477 | tool.OwnCopy(enfr,ento,TC); |
478 | } |
479 | break; |
480 | case 9 : { |
481 | DeclareAndCast(IGESDraw_Planar,enfr,entfrom); |
482 | DeclareAndCast(IGESDraw_Planar,ento,entto); |
483 | IGESDraw_ToolPlanar tool; |
484 | tool.OwnCopy(enfr,ento,TC); |
485 | } |
486 | break; |
487 | case 10 : { |
488 | DeclareAndCast(IGESDraw_RectArraySubfigure,enfr,entfrom); |
489 | DeclareAndCast(IGESDraw_RectArraySubfigure,ento,entto); |
490 | IGESDraw_ToolRectArraySubfigure tool; |
491 | tool.OwnCopy(enfr,ento,TC); |
492 | } |
493 | break; |
494 | case 11 : { |
495 | DeclareAndCast(IGESDraw_SegmentedViewsVisible,enfr,entfrom); |
496 | DeclareAndCast(IGESDraw_SegmentedViewsVisible,ento,entto); |
497 | IGESDraw_ToolSegmentedViewsVisible tool; |
498 | tool.OwnCopy(enfr,ento,TC); |
499 | } |
500 | break; |
501 | case 12 : { |
502 | DeclareAndCast(IGESDraw_View,enfr,entfrom); |
503 | DeclareAndCast(IGESDraw_View,ento,entto); |
504 | IGESDraw_ToolView tool; |
505 | tool.OwnCopy(enfr,ento,TC); |
506 | } |
507 | break; |
508 | case 13 : { |
509 | DeclareAndCast(IGESDraw_ViewsVisible,enfr,entfrom); |
510 | DeclareAndCast(IGESDraw_ViewsVisible,ento,entto); |
511 | IGESDraw_ToolViewsVisible tool; |
512 | tool.OwnCopy(enfr,ento,TC); |
513 | } |
514 | break; |
515 | case 14 : { |
516 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,enfr,entfrom); |
517 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,ento,entto); |
518 | IGESDraw_ToolViewsVisibleWithAttr tool; |
519 | tool.OwnCopy(enfr,ento,TC); |
520 | } |
521 | break; |
522 | default : break; |
523 | } |
524 | } |
525 | |
526 | |
527 | void IGESDraw_GeneralModule::OwnRenewCase |
528 | (const Standard_Integer CN, |
529 | const Handle(IGESData_IGESEntity)& entfrom, |
530 | const Handle(IGESData_IGESEntity)& entto, |
531 | const Interface_CopyTool& TC) const |
532 | { |
533 | switch (CN) { |
534 | case 13 : { |
535 | DeclareAndCast(IGESDraw_ViewsVisible,enfr,entfrom); |
536 | DeclareAndCast(IGESDraw_ViewsVisible,ento,entto); |
537 | IGESDraw_ToolViewsVisible tool; |
538 | tool.OwnRenew(enfr,ento,TC); |
539 | } |
540 | break; |
541 | case 14 : { |
542 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,enfr,entfrom); |
543 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,ento,entto); |
544 | IGESDraw_ToolViewsVisibleWithAttr tool; |
545 | tool.OwnRenew(enfr,ento,TC); |
546 | } |
547 | break; |
548 | default : break; |
549 | } |
550 | } |
551 | |
552 | |
553 | void IGESDraw_GeneralModule::OwnDeleteCase |
554 | (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const |
555 | { |
556 | switch (CN) { |
557 | case 13 : { |
558 | DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); |
559 | IGESDraw_ToolViewsVisible tool; |
560 | tool.OwnWhenDelete(anent); |
561 | } |
562 | break; |
563 | case 14 : { |
564 | DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); |
565 | IGESDraw_ToolViewsVisibleWithAttr tool; |
566 | tool.OwnWhenDelete(anent); |
567 | } |
568 | break; |
569 | default : break; |
570 | } |
571 | } |
572 | |
573 | |
574 | Standard_Integer IGESDraw_GeneralModule::CategoryNumber |
575 | (const Standard_Integer CN, const Handle(Standard_Transient)& , |
576 | const Interface_ShareTool& ) const |
577 | { |
578 | if (CN == 9) return Interface_Category::Number("Auxiliary"); |
579 | if (CN == 1 || CN == 2 || CN == 10) return Interface_Category::Number("Structure"); |
580 | return Interface_Category::Number("Drawing"); |
581 | } |