0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / IGESAppli / IGESAppli_GeneralModule.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <IGESAppli_DrilledHole.hxx>
16 #include <IGESAppli_ElementResults.hxx>
17 #include <IGESAppli_FiniteElement.hxx>
18 #include <IGESAppli_Flow.hxx>
19 #include <IGESAppli_FlowLineSpec.hxx>
20 #include <IGESAppli_GeneralModule.hxx>
21 #include <IGESAppli_LevelFunction.hxx>
22 #include <IGESAppli_LevelToPWBLayerMap.hxx>
23 #include <IGESAppli_LineWidening.hxx>
24 #include <IGESAppli_NodalConstraint.hxx>
25 #include <IGESAppli_NodalDisplAndRot.hxx>
26 #include <IGESAppli_NodalResults.hxx>
27 #include <IGESAppli_Node.hxx>
28 #include <IGESAppli_PartNumber.hxx>
29 #include <IGESAppli_PinNumber.hxx>
30 #include <IGESAppli_PipingFlow.hxx>
31 #include <IGESAppli_PWBArtworkStackup.hxx>
32 #include <IGESAppli_PWBDrilledHole.hxx>
33 #include <IGESAppli_ReferenceDesignator.hxx>
34 #include <IGESAppli_RegionRestriction.hxx>
35 #include <IGESAppli_ToolDrilledHole.hxx>
36 #include <IGESAppli_ToolElementResults.hxx>
37 #include <IGESAppli_ToolFiniteElement.hxx>
38 #include <IGESAppli_ToolFlow.hxx>
39 #include <IGESAppli_ToolFlowLineSpec.hxx>
40 #include <IGESAppli_ToolLevelFunction.hxx>
41 #include <IGESAppli_ToolLevelToPWBLayerMap.hxx>
42 #include <IGESAppli_ToolLineWidening.hxx>
43 #include <IGESAppli_ToolNodalConstraint.hxx>
44 #include <IGESAppli_ToolNodalDisplAndRot.hxx>
45 #include <IGESAppli_ToolNodalResults.hxx>
46 #include <IGESAppli_ToolNode.hxx>
47 #include <IGESAppli_ToolPartNumber.hxx>
48 #include <IGESAppli_ToolPinNumber.hxx>
49 #include <IGESAppli_ToolPipingFlow.hxx>
50 #include <IGESAppli_ToolPWBArtworkStackup.hxx>
51 #include <IGESAppli_ToolPWBDrilledHole.hxx>
52 #include <IGESAppli_ToolReferenceDesignator.hxx>
53 #include <IGESAppli_ToolRegionRestriction.hxx>
54 #include <IGESData_DirChecker.hxx>
55 #include <IGESData_IGESEntity.hxx>
56 #include <Interface_Category.hxx>
57 #include <Interface_Check.hxx>
58 #include <Interface_CopyTool.hxx>
59 #include <Interface_EntityIterator.hxx>
60 #include <Interface_Macros.hxx>
61 #include <Interface_ShareTool.hxx>
62 #include <Standard_Transient.hxx>
63 #include <Standard_Type.hxx>
64
65 IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_GeneralModule,IGESData_GeneralModule)
66
67 //  Each Module is attached to a Protocol : it must interprete Case Numbers
68 //  (arguments <CN> of various methods) in accordance to values returned by
69 //  the method TypeNumber from this Protocol
70 IGESAppli_GeneralModule::IGESAppli_GeneralModule ()    {  }
71
72
73     void  IGESAppli_GeneralModule::OwnSharedCase
74   (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
75    Interface_EntityIterator& iter) const 
76 {
77   switch (CN) {
78     case  1 : {
79       DeclareAndCast(IGESAppli_DrilledHole,anent,ent);
80       if (anent.IsNull()) return;
81       IGESAppli_ToolDrilledHole tool;
82       tool.OwnShared(anent,iter);
83     }
84       break;
85     case  2 : {
86       DeclareAndCast(IGESAppli_ElementResults,anent,ent);
87       if (anent.IsNull()) return;
88       IGESAppli_ToolElementResults tool;
89       tool.OwnShared(anent,iter);
90     }
91       break;
92     case  3 : {
93       DeclareAndCast(IGESAppli_FiniteElement,anent,ent);
94       if (anent.IsNull()) return;
95       IGESAppli_ToolFiniteElement tool;
96       tool.OwnShared(anent,iter);
97     }
98       break;
99     case  4 : {
100       DeclareAndCast(IGESAppli_Flow,anent,ent);
101       if (anent.IsNull()) return;
102       IGESAppli_ToolFlow tool;
103       tool.OwnShared(anent,iter);
104     }
105       break;
106     case  5 : {
107       DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent);
108       if (anent.IsNull()) return;
109       IGESAppli_ToolFlowLineSpec tool;
110       tool.OwnShared(anent,iter);
111     }
112       break;
113     case  6 : {
114       DeclareAndCast(IGESAppli_LevelFunction,anent,ent);
115       if (anent.IsNull()) return;
116       IGESAppli_ToolLevelFunction tool;
117       tool.OwnShared(anent,iter);
118     }
119       break;
120     case  7 : {
121       DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent);
122       if (anent.IsNull()) return;
123       IGESAppli_ToolLevelToPWBLayerMap tool;
124       tool.OwnShared(anent,iter);
125     }
126       break;
127     case  8 : {
128       DeclareAndCast(IGESAppli_LineWidening,anent,ent);
129       if (anent.IsNull()) return;
130       IGESAppli_ToolLineWidening tool;
131       tool.OwnShared(anent,iter);
132     }
133       break;
134     case  9 : {
135       DeclareAndCast(IGESAppli_NodalConstraint,anent,ent);
136       if (anent.IsNull()) return;
137       IGESAppli_ToolNodalConstraint tool;
138       tool.OwnShared(anent,iter);
139     }
140       break;
141     case 10 : {
142       DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent);
143       if (anent.IsNull()) return;
144       IGESAppli_ToolNodalDisplAndRot tool;
145       tool.OwnShared(anent,iter);
146     }
147       break;
148     case 11 : {
149       DeclareAndCast(IGESAppli_NodalResults,anent,ent);
150       if (anent.IsNull()) return;
151       IGESAppli_ToolNodalResults tool;
152       tool.OwnShared(anent,iter);
153     }
154       break;
155     case 12 : {
156       DeclareAndCast(IGESAppli_Node,anent,ent);
157       if (anent.IsNull()) return;
158       IGESAppli_ToolNode tool;
159       tool.OwnShared(anent,iter);
160     }
161       break;
162     case 13 : {
163       DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent);
164       if (anent.IsNull()) return;
165       IGESAppli_ToolPWBArtworkStackup tool;
166       tool.OwnShared(anent,iter);
167     }
168       break;
169     case 14 : {
170       DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent);
171       if (anent.IsNull()) return;
172       IGESAppli_ToolPWBDrilledHole tool;
173       tool.OwnShared(anent,iter);
174     }
175       break;
176     case 15 : {
177       DeclareAndCast(IGESAppli_PartNumber,anent,ent);
178       if (anent.IsNull()) return;
179       IGESAppli_ToolPartNumber tool;
180       tool.OwnShared(anent,iter);
181     }
182       break;
183     case 16 : {
184       DeclareAndCast(IGESAppli_PinNumber,anent,ent);
185       if (anent.IsNull()) return;
186       IGESAppli_ToolPinNumber tool;
187       tool.OwnShared(anent,iter);
188     }
189       break;
190     case 17 : {
191       DeclareAndCast(IGESAppli_PipingFlow,anent,ent);
192       if (anent.IsNull()) return;
193       IGESAppli_ToolPipingFlow tool;
194       tool.OwnShared(anent,iter);
195     }
196       break;
197     case 18 : {
198       DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent);
199       if (anent.IsNull()) return;
200       IGESAppli_ToolReferenceDesignator tool;
201       tool.OwnShared(anent,iter);
202     }
203       break;
204     case 19 : {
205       DeclareAndCast(IGESAppli_RegionRestriction,anent,ent);
206       if (anent.IsNull()) return;
207       IGESAppli_ToolRegionRestriction tool;
208       tool.OwnShared(anent,iter);
209     }
210       break;
211     default : break;
212   }
213 }
214
215
216     IGESData_DirChecker  IGESAppli_GeneralModule::DirChecker
217   (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const 
218 {
219   switch (CN) {
220     case  1 : {
221       DeclareAndCast(IGESAppli_DrilledHole,anent,ent);
222       if (anent.IsNull()) break;
223       IGESAppli_ToolDrilledHole tool;
224       return tool.DirChecker(anent);
225     }
226     case  2 : {
227       DeclareAndCast(IGESAppli_ElementResults,anent,ent);
228       if (anent.IsNull()) break;
229       IGESAppli_ToolElementResults tool;
230       return tool.DirChecker(anent);
231     }
232     case  3 : {
233       DeclareAndCast(IGESAppli_FiniteElement,anent,ent);
234       if (anent.IsNull()) break;
235       IGESAppli_ToolFiniteElement tool;
236       return tool.DirChecker(anent);
237     }
238     case  4 : {
239       DeclareAndCast(IGESAppli_Flow,anent,ent);
240       if (anent.IsNull()) break;
241       IGESAppli_ToolFlow tool;
242       return tool.DirChecker(anent);
243     }
244     case  5 : {
245       DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent);
246       if (anent.IsNull()) break;
247       IGESAppli_ToolFlowLineSpec tool;
248       return tool.DirChecker(anent);
249     }
250     case  6 : {
251       DeclareAndCast(IGESAppli_LevelFunction,anent,ent);
252       if (anent.IsNull()) break;
253       IGESAppli_ToolLevelFunction tool;
254       return tool.DirChecker(anent);
255     }
256     case  7 : {
257       DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent);
258       if (anent.IsNull()) break;
259       IGESAppli_ToolLevelToPWBLayerMap tool;
260       return tool.DirChecker(anent);
261     }
262     case  8 : {
263       DeclareAndCast(IGESAppli_LineWidening,anent,ent);
264       if (anent.IsNull()) break;
265       IGESAppli_ToolLineWidening tool;
266       return tool.DirChecker(anent);
267     }
268     case  9 : {
269       DeclareAndCast(IGESAppli_NodalConstraint,anent,ent);
270       if (anent.IsNull()) break;
271       IGESAppli_ToolNodalConstraint tool;
272       return tool.DirChecker(anent);
273     }
274     case 10 : {
275       DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent);
276       if (anent.IsNull()) break;
277       IGESAppli_ToolNodalDisplAndRot tool;
278       return tool.DirChecker(anent);
279     }
280     case 11 : {
281       DeclareAndCast(IGESAppli_NodalResults,anent,ent);
282       if (anent.IsNull()) break;
283       IGESAppli_ToolNodalResults tool;
284       return tool.DirChecker(anent);
285     }
286     case 12 : {
287       DeclareAndCast(IGESAppli_Node,anent,ent);
288       if (anent.IsNull()) break;
289       IGESAppli_ToolNode tool;
290       return tool.DirChecker(anent);
291     }
292     case 13 : {
293       DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent);
294       if (anent.IsNull()) break;
295       IGESAppli_ToolPWBArtworkStackup tool;
296       return tool.DirChecker(anent);
297     }
298     case 14 : {
299       DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent);
300       if (anent.IsNull()) break;
301       IGESAppli_ToolPWBDrilledHole tool;
302       return tool.DirChecker(anent);
303     }
304     case 15 : {
305       DeclareAndCast(IGESAppli_PartNumber,anent,ent);
306       if (anent.IsNull()) break;
307       IGESAppli_ToolPartNumber tool;
308       return tool.DirChecker(anent);
309     }
310     case 16 : {
311       DeclareAndCast(IGESAppli_PinNumber,anent,ent);
312       if (anent.IsNull()) break;
313       IGESAppli_ToolPinNumber tool;
314       return tool.DirChecker(anent);
315     }
316     case 17 : {
317       DeclareAndCast(IGESAppli_PipingFlow,anent,ent);
318       if (anent.IsNull()) break;
319       IGESAppli_ToolPipingFlow tool;
320       return tool.DirChecker(anent);
321     }
322     case 18 : {
323       DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent);
324       if (anent.IsNull()) break;
325       IGESAppli_ToolReferenceDesignator tool;
326       return tool.DirChecker(anent);
327     }
328     case 19 : {
329       DeclareAndCast(IGESAppli_RegionRestriction,anent,ent);
330       if (anent.IsNull()) break;
331       IGESAppli_ToolRegionRestriction tool;
332       return tool.DirChecker(anent);
333     }
334     default : break;
335   }
336   return IGESData_DirChecker();    // by default, no specific criterium
337 }
338
339
340     void  IGESAppli_GeneralModule::OwnCheckCase
341   (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
342    const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const 
343 {
344   switch (CN) {
345     case  1 : {
346       DeclareAndCast(IGESAppli_DrilledHole,anent,ent);
347       if (anent.IsNull()) return;
348       IGESAppli_ToolDrilledHole tool;
349       tool.OwnCheck(anent,shares,ach);
350     }
351       break;
352     case  2 : {
353       DeclareAndCast(IGESAppli_ElementResults,anent,ent);
354       if (anent.IsNull()) return;
355       IGESAppli_ToolElementResults tool;
356       tool.OwnCheck(anent,shares,ach);
357     }
358       break;
359     case  3 : {
360       DeclareAndCast(IGESAppli_FiniteElement,anent,ent);
361       if (anent.IsNull()) return;
362       IGESAppli_ToolFiniteElement tool;
363       tool.OwnCheck(anent,shares,ach);
364     }
365       break;
366     case  4 : {
367       DeclareAndCast(IGESAppli_Flow,anent,ent);
368       if (anent.IsNull()) return;
369       IGESAppli_ToolFlow tool;
370       tool.OwnCheck(anent,shares,ach);
371     }
372       break;
373     case  5 : {
374       DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent);
375       if (anent.IsNull()) return;
376       IGESAppli_ToolFlowLineSpec tool;
377       tool.OwnCheck(anent,shares,ach);
378     }
379       break;
380     case  6 : {
381       DeclareAndCast(IGESAppli_LevelFunction,anent,ent);
382       if (anent.IsNull()) return;
383       IGESAppli_ToolLevelFunction tool;
384       tool.OwnCheck(anent,shares,ach);
385     }
386       break;
387     case  7 : {
388       DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent);
389       if (anent.IsNull()) return;
390       IGESAppli_ToolLevelToPWBLayerMap tool;
391       tool.OwnCheck(anent,shares,ach);
392     }
393       break;
394     case  8 : {
395       DeclareAndCast(IGESAppli_LineWidening,anent,ent);
396       if (anent.IsNull()) return;
397       IGESAppli_ToolLineWidening tool;
398       tool.OwnCheck(anent,shares,ach);
399     }
400       break;
401     case  9 : {
402       DeclareAndCast(IGESAppli_NodalConstraint,anent,ent);
403       if (anent.IsNull()) return;
404       IGESAppli_ToolNodalConstraint tool;
405       tool.OwnCheck(anent,shares,ach);
406     }
407       break;
408     case 10 : {
409       DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent);
410       if (anent.IsNull()) return;
411       IGESAppli_ToolNodalDisplAndRot tool;
412       tool.OwnCheck(anent,shares,ach);
413     }
414       break;
415     case 11 : {
416       DeclareAndCast(IGESAppli_NodalResults,anent,ent);
417       if (anent.IsNull()) return;
418       IGESAppli_ToolNodalResults tool;
419       tool.OwnCheck(anent,shares,ach);
420     }
421       break;
422     case 12 : {
423       DeclareAndCast(IGESAppli_Node,anent,ent);
424       if (anent.IsNull()) return;
425       IGESAppli_ToolNode tool;
426       tool.OwnCheck(anent,shares,ach);
427     }
428       break;
429     case 13 : {
430       DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent);
431       if (anent.IsNull()) return;
432       IGESAppli_ToolPWBArtworkStackup tool;
433       tool.OwnCheck(anent,shares,ach);
434     }
435       break;
436     case 14 : {
437       DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent);
438       if (anent.IsNull()) return;
439       IGESAppli_ToolPWBDrilledHole tool;
440       tool.OwnCheck(anent,shares,ach);
441     }
442       break;
443     case 15 : {
444       DeclareAndCast(IGESAppli_PartNumber,anent,ent);
445       if (anent.IsNull()) return;
446       IGESAppli_ToolPartNumber tool;
447       tool.OwnCheck(anent,shares,ach);
448     }
449       break;
450     case 16 : {
451       DeclareAndCast(IGESAppli_PinNumber,anent,ent);
452       if (anent.IsNull()) return;
453       IGESAppli_ToolPinNumber tool;
454       tool.OwnCheck(anent,shares,ach);
455     }
456       break;
457     case 17 : {
458       DeclareAndCast(IGESAppli_PipingFlow,anent,ent);
459       if (anent.IsNull()) return;
460       IGESAppli_ToolPipingFlow tool;
461       tool.OwnCheck(anent,shares,ach);
462     }
463       break;
464     case 18 : {
465       DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent);
466       if (anent.IsNull()) return;
467       IGESAppli_ToolReferenceDesignator tool;
468       tool.OwnCheck(anent,shares,ach);
469     }
470       break;
471     case 19 : {
472       DeclareAndCast(IGESAppli_RegionRestriction,anent,ent);
473       if (anent.IsNull()) return;
474       IGESAppli_ToolRegionRestriction tool;
475       tool.OwnCheck(anent,shares,ach);
476     }
477       break;
478     default : break;
479   }
480 }
481
482     Standard_Boolean  IGESAppli_GeneralModule::NewVoid
483   (const Standard_Integer CN, Handle(Standard_Transient)& ent) const 
484 {
485   switch (CN) {
486     case  1 : ent = new IGESAppli_DrilledHole;  break;
487     case  2 : ent = new IGESAppli_ElementResults;       break;
488     case  3 : ent = new IGESAppli_FiniteElement;        break;
489     case  4 : ent = new IGESAppli_Flow; break;
490     case  5 : ent = new IGESAppli_FlowLineSpec; break;
491     case  6 : ent = new IGESAppli_LevelFunction;        break;
492     case  7 : ent = new IGESAppli_LevelToPWBLayerMap;   break;
493     case  8 : ent = new IGESAppli_LineWidening; break;
494     case  9 : ent = new IGESAppli_NodalConstraint;      break;
495     case 10 : ent = new IGESAppli_NodalDisplAndRot;     break;
496     case 11 : ent = new IGESAppli_NodalResults; break;
497     case 12 : ent = new IGESAppli_Node; break;
498     case 13 : ent = new IGESAppli_PWBArtworkStackup;    break;
499     case 14 : ent = new IGESAppli_PWBDrilledHole;       break;
500     case 15 : ent = new IGESAppli_PartNumber;   break;
501     case 16 : ent = new IGESAppli_PinNumber;    break;
502     case 17 : ent = new IGESAppli_PipingFlow;   break;
503     case 18 : ent = new IGESAppli_ReferenceDesignator;  break;
504     case 19 : ent = new IGESAppli_RegionRestriction;    break;
505     default : return Standard_False;    // by default, Failure on Recognize
506   }
507   return Standard_True;
508 }
509
510     void  IGESAppli_GeneralModule::OwnCopyCase
511   (const Standard_Integer CN,
512    const Handle(IGESData_IGESEntity)& entfrom,
513    const Handle(IGESData_IGESEntity)& entto,
514    Interface_CopyTool& TC) const 
515 {
516   switch (CN) {
517     case  1 : {
518       DeclareAndCast(IGESAppli_DrilledHole,enfr,entfrom);
519       DeclareAndCast(IGESAppli_DrilledHole,ento,entto);
520       IGESAppli_ToolDrilledHole tool;
521       tool.OwnCopy(enfr,ento,TC);
522     }
523       break;
524     case  2 : {
525       DeclareAndCast(IGESAppli_ElementResults,enfr,entfrom);
526       DeclareAndCast(IGESAppli_ElementResults,ento,entto);
527       IGESAppli_ToolElementResults tool;
528       tool.OwnCopy(enfr,ento,TC);
529     }
530       break;
531     case  3 : {
532       DeclareAndCast(IGESAppli_FiniteElement,enfr,entfrom);
533       DeclareAndCast(IGESAppli_FiniteElement,ento,entto);
534       IGESAppli_ToolFiniteElement tool;
535       tool.OwnCopy(enfr,ento,TC);
536     }
537       break;
538     case  4 : {
539       DeclareAndCast(IGESAppli_Flow,enfr,entfrom);
540       DeclareAndCast(IGESAppli_Flow,ento,entto);
541       IGESAppli_ToolFlow tool;
542       tool.OwnCopy(enfr,ento,TC);
543     }
544       break;
545     case  5 : {
546       DeclareAndCast(IGESAppli_FlowLineSpec,enfr,entfrom);
547       DeclareAndCast(IGESAppli_FlowLineSpec,ento,entto);
548       IGESAppli_ToolFlowLineSpec tool;
549       tool.OwnCopy(enfr,ento,TC);
550     }
551       break;
552     case  6 : {
553       DeclareAndCast(IGESAppli_LevelFunction,enfr,entfrom);
554       DeclareAndCast(IGESAppli_LevelFunction,ento,entto);
555       IGESAppli_ToolLevelFunction tool;
556       tool.OwnCopy(enfr,ento,TC);
557     }
558       break;
559     case  7 : {
560       DeclareAndCast(IGESAppli_LevelToPWBLayerMap,enfr,entfrom);
561       DeclareAndCast(IGESAppli_LevelToPWBLayerMap,ento,entto);
562       IGESAppli_ToolLevelToPWBLayerMap tool;
563       tool.OwnCopy(enfr,ento,TC);
564     }
565       break;
566     case  8 : {
567       DeclareAndCast(IGESAppli_LineWidening,enfr,entfrom);
568       DeclareAndCast(IGESAppli_LineWidening,ento,entto);
569       IGESAppli_ToolLineWidening tool;
570       tool.OwnCopy(enfr,ento,TC);
571     }
572       break;
573     case  9 : {
574       DeclareAndCast(IGESAppli_NodalConstraint,enfr,entfrom);
575       DeclareAndCast(IGESAppli_NodalConstraint,ento,entto);
576       IGESAppli_ToolNodalConstraint tool;
577       tool.OwnCopy(enfr,ento,TC);
578     }
579       break;
580     case 10 : {
581       DeclareAndCast(IGESAppli_NodalDisplAndRot,enfr,entfrom);
582       DeclareAndCast(IGESAppli_NodalDisplAndRot,ento,entto);
583       IGESAppli_ToolNodalDisplAndRot tool;
584       tool.OwnCopy(enfr,ento,TC);
585     }
586       break;
587     case 11 : {
588       DeclareAndCast(IGESAppli_NodalResults,enfr,entfrom);
589       DeclareAndCast(IGESAppli_NodalResults,ento,entto);
590       IGESAppli_ToolNodalResults tool;
591       tool.OwnCopy(enfr,ento,TC);
592     }
593       break;
594     case 12 : {
595       DeclareAndCast(IGESAppli_Node,enfr,entfrom);
596       DeclareAndCast(IGESAppli_Node,ento,entto);
597       IGESAppli_ToolNode tool;
598       tool.OwnCopy(enfr,ento,TC);
599     }
600       break;
601     case 13 : {
602       DeclareAndCast(IGESAppli_PWBArtworkStackup,enfr,entfrom);
603       DeclareAndCast(IGESAppli_PWBArtworkStackup,ento,entto);
604       IGESAppli_ToolPWBArtworkStackup tool;
605       tool.OwnCopy(enfr,ento,TC);
606     }
607       break;
608     case 14 : {
609       DeclareAndCast(IGESAppli_PWBDrilledHole,enfr,entfrom);
610       DeclareAndCast(IGESAppli_PWBDrilledHole,ento,entto);
611       IGESAppli_ToolPWBDrilledHole tool;
612       tool.OwnCopy(enfr,ento,TC);
613     }
614       break;
615     case 15 : {
616       DeclareAndCast(IGESAppli_PartNumber,enfr,entfrom);
617       DeclareAndCast(IGESAppli_PartNumber,ento,entto);
618       IGESAppli_ToolPartNumber tool;
619       tool.OwnCopy(enfr,ento,TC);
620     }
621       break;
622     case 16 : {
623       DeclareAndCast(IGESAppli_PinNumber,enfr,entfrom);
624       DeclareAndCast(IGESAppli_PinNumber,ento,entto);
625       IGESAppli_ToolPinNumber tool;
626       tool.OwnCopy(enfr,ento,TC);
627     }
628       break;
629     case 17 : {
630       DeclareAndCast(IGESAppli_PipingFlow,enfr,entfrom);
631       DeclareAndCast(IGESAppli_PipingFlow,ento,entto);
632       IGESAppli_ToolPipingFlow tool;
633       tool.OwnCopy(enfr,ento,TC);
634     }
635       break;
636     case 18 : {
637       DeclareAndCast(IGESAppli_ReferenceDesignator,enfr,entfrom);
638       DeclareAndCast(IGESAppli_ReferenceDesignator,ento,entto);
639       IGESAppli_ToolReferenceDesignator tool;
640       tool.OwnCopy(enfr,ento,TC);
641     }
642       break;
643     case 19 : {
644       DeclareAndCast(IGESAppli_RegionRestriction,enfr,entfrom);
645       DeclareAndCast(IGESAppli_RegionRestriction,ento,entto);
646       IGESAppli_ToolRegionRestriction tool;
647       tool.OwnCopy(enfr,ento,TC);
648     }
649       break;
650     default : break;
651   }
652 }
653
654
655     Standard_Integer  IGESAppli_GeneralModule::CategoryNumber
656   (const Standard_Integer CN, const Handle(Standard_Transient)& /*ent*/,
657    const Interface_ShareTool& ) const
658 {
659   if (CN == 4 || CN == 5 || CN == 17) return Interface_Category::Number("Piping");
660   if (CN == 2 || CN == 3 || (CN >= 9 && CN <= 12)) return Interface_Category::Number("FEA");
661   return Interface_Category::Number("Professional");
662 }