0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / IGESDefs / IGESDefs_SpecificModule.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 #include <IGESDefs_SpecificModule.ixx>
15 #include <Interface_Macros.hxx>
16
17 #include <IGESDefs_AssociativityDef.hxx>
18 #include <IGESDefs_AttributeDef.hxx>
19 #include <IGESDefs_AttributeTable.hxx>
20 #include <IGESDefs_GenericData.hxx>
21 #include <IGESDefs_MacroDef.hxx>
22 #include <IGESDefs_TabularData.hxx>
23 #include <IGESDefs_UnitsData.hxx>
24
25 #include <IGESDefs_ToolAssociativityDef.hxx>
26 #include <IGESDefs_ToolAttributeDef.hxx>
27 #include <IGESDefs_ToolAttributeTable.hxx>
28 #include <IGESDefs_ToolGenericData.hxx>
29 #include <IGESDefs_ToolMacroDef.hxx>
30 #include <IGESDefs_ToolTabularData.hxx>
31 #include <IGESDefs_ToolUnitsData.hxx>
32
33
34
35 //  Each Module is attached to a Protocol : it must interprete Case Numbers
36 //  (arguments <CN> of various methods) in accordance to values returned by
37 //  the method TypeNumber from this Protocol
38
39
40 IGESDefs_SpecificModule::IGESDefs_SpecificModule()    {  }
41
42
43     void  IGESDefs_SpecificModule::OwnDump
44   (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
45    const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S,
46    const Standard_Integer own) const 
47 {
48   switch (CN) {
49     case  1 : {
50       DeclareAndCast(IGESDefs_AssociativityDef,anent,ent);
51       if (anent.IsNull()) return;
52       IGESDefs_ToolAssociativityDef tool;
53       tool.OwnDump(anent,dumper,S,own);
54     }
55       break;
56     case  2 : {
57       DeclareAndCast(IGESDefs_AttributeDef,anent,ent);
58       if (anent.IsNull()) return;
59       IGESDefs_ToolAttributeDef tool;
60       tool.OwnDump(anent,dumper,S,own);
61     }
62       break;
63     case  3 : {
64       DeclareAndCast(IGESDefs_AttributeTable,anent,ent);
65       if (anent.IsNull()) return;
66       IGESDefs_ToolAttributeTable tool;
67       tool.OwnDump(anent,dumper,S,own);
68     }
69       break;
70     case  4 : {
71       DeclareAndCast(IGESDefs_GenericData,anent,ent);
72       if (anent.IsNull()) return;
73       IGESDefs_ToolGenericData tool;
74       tool.OwnDump(anent,dumper,S,own);
75     }
76       break;
77     case  5 : {
78       DeclareAndCast(IGESDefs_MacroDef,anent,ent);
79       if (anent.IsNull()) return;
80       IGESDefs_ToolMacroDef tool;
81       tool.OwnDump(anent,dumper,S,own);
82     }
83       break;
84     case  6 : {
85       DeclareAndCast(IGESDefs_TabularData,anent,ent);
86       if (anent.IsNull()) return;
87       IGESDefs_ToolTabularData tool;
88       tool.OwnDump(anent,dumper,S,own);
89     }
90       break;
91     case  7 : {
92       DeclareAndCast(IGESDefs_UnitsData,anent,ent);
93       if (anent.IsNull()) return;
94       IGESDefs_ToolUnitsData tool;
95       tool.OwnDump(anent,dumper,S,own);
96     }
97       break;
98     default : break;
99   }
100 }