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