1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <IGESData_IGESDumper.hxx>
16 #include <IGESData_IGESEntity.hxx>
17 #include <IGESSolid_Block.hxx>
18 #include <IGESSolid_BooleanTree.hxx>
19 #include <IGESSolid_ConeFrustum.hxx>
20 #include <IGESSolid_ConicalSurface.hxx>
21 #include <IGESSolid_Cylinder.hxx>
22 #include <IGESSolid_CylindricalSurface.hxx>
23 #include <IGESSolid_EdgeList.hxx>
24 #include <IGESSolid_Ellipsoid.hxx>
25 #include <IGESSolid_Face.hxx>
26 #include <IGESSolid_Loop.hxx>
27 #include <IGESSolid_ManifoldSolid.hxx>
28 #include <IGESSolid_PlaneSurface.hxx>
29 #include <IGESSolid_RightAngularWedge.hxx>
30 #include <IGESSolid_SelectedComponent.hxx>
31 #include <IGESSolid_Shell.hxx>
32 #include <IGESSolid_SolidAssembly.hxx>
33 #include <IGESSolid_SolidInstance.hxx>
34 #include <IGESSolid_SolidOfLinearExtrusion.hxx>
35 #include <IGESSolid_SolidOfRevolution.hxx>
36 #include <IGESSolid_SpecificModule.hxx>
37 #include <IGESSolid_Sphere.hxx>
38 #include <IGESSolid_SphericalSurface.hxx>
39 #include <IGESSolid_ToolBlock.hxx>
40 #include <IGESSolid_ToolBooleanTree.hxx>
41 #include <IGESSolid_ToolConeFrustum.hxx>
42 #include <IGESSolid_ToolConicalSurface.hxx>
43 #include <IGESSolid_ToolCylinder.hxx>
44 #include <IGESSolid_ToolCylindricalSurface.hxx>
45 #include <IGESSolid_ToolEdgeList.hxx>
46 #include <IGESSolid_ToolEllipsoid.hxx>
47 #include <IGESSolid_ToolFace.hxx>
48 #include <IGESSolid_ToolLoop.hxx>
49 #include <IGESSolid_ToolManifoldSolid.hxx>
50 #include <IGESSolid_ToolPlaneSurface.hxx>
51 #include <IGESSolid_ToolRightAngularWedge.hxx>
52 #include <IGESSolid_ToolSelectedComponent.hxx>
53 #include <IGESSolid_ToolShell.hxx>
54 #include <IGESSolid_ToolSolidAssembly.hxx>
55 #include <IGESSolid_ToolSolidInstance.hxx>
56 #include <IGESSolid_ToolSolidOfLinearExtrusion.hxx>
57 #include <IGESSolid_ToolSolidOfRevolution.hxx>
58 #include <IGESSolid_ToolSphere.hxx>
59 #include <IGESSolid_ToolSphericalSurface.hxx>
60 #include <IGESSolid_ToolToroidalSurface.hxx>
61 #include <IGESSolid_ToolTorus.hxx>
62 #include <IGESSolid_ToolVertexList.hxx>
63 #include <IGESSolid_ToroidalSurface.hxx>
64 #include <IGESSolid_Torus.hxx>
65 #include <IGESSolid_VertexList.hxx>
66 #include <Interface_Macros.hxx>
67 #include <Message_Messenger.hxx>
68 #include <Standard_Type.hxx>
70 IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SpecificModule,IGESData_SpecificModule)
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 IGESSolid_SpecificModule::IGESSolid_SpecificModule() { }
78 void IGESSolid_SpecificModule::OwnDump
79 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
80 const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S,
81 const Standard_Integer own) const
85 DeclareAndCast(IGESSolid_Block,anent,ent);
86 if (anent.IsNull()) return;
87 IGESSolid_ToolBlock tool;
88 tool.OwnDump(anent,dumper,S,own);
92 DeclareAndCast(IGESSolid_BooleanTree,anent,ent);
93 if (anent.IsNull()) return;
94 IGESSolid_ToolBooleanTree tool;
95 tool.OwnDump(anent,dumper,S,own);
99 DeclareAndCast(IGESSolid_ConeFrustum,anent,ent);
100 if (anent.IsNull()) return;
101 IGESSolid_ToolConeFrustum tool;
102 tool.OwnDump(anent,dumper,S,own);
106 DeclareAndCast(IGESSolid_ConicalSurface,anent,ent);
107 if (anent.IsNull()) return;
108 IGESSolid_ToolConicalSurface tool;
109 tool.OwnDump(anent,dumper,S,own);
113 DeclareAndCast(IGESSolid_Cylinder,anent,ent);
114 if (anent.IsNull()) return;
115 IGESSolid_ToolCylinder tool;
116 tool.OwnDump(anent,dumper,S,own);
120 DeclareAndCast(IGESSolid_CylindricalSurface,anent,ent);
121 if (anent.IsNull()) return;
122 IGESSolid_ToolCylindricalSurface tool;
123 tool.OwnDump(anent,dumper,S,own);
127 DeclareAndCast(IGESSolid_EdgeList,anent,ent);
128 if (anent.IsNull()) return;
129 IGESSolid_ToolEdgeList tool;
130 tool.OwnDump(anent,dumper,S,own);
134 DeclareAndCast(IGESSolid_Ellipsoid,anent,ent);
135 if (anent.IsNull()) return;
136 IGESSolid_ToolEllipsoid tool;
137 tool.OwnDump(anent,dumper,S,own);
141 DeclareAndCast(IGESSolid_Face,anent,ent);
142 if (anent.IsNull()) return;
143 IGESSolid_ToolFace tool;
144 tool.OwnDump(anent,dumper,S,own);
148 DeclareAndCast(IGESSolid_Loop,anent,ent);
149 if (anent.IsNull()) return;
150 IGESSolid_ToolLoop tool;
151 tool.OwnDump(anent,dumper,S,own);
155 DeclareAndCast(IGESSolid_ManifoldSolid,anent,ent);
156 if (anent.IsNull()) return;
157 IGESSolid_ToolManifoldSolid tool;
158 tool.OwnDump(anent,dumper,S,own);
162 DeclareAndCast(IGESSolid_PlaneSurface,anent,ent);
163 if (anent.IsNull()) return;
164 IGESSolid_ToolPlaneSurface tool;
165 tool.OwnDump(anent,dumper,S,own);
169 DeclareAndCast(IGESSolid_RightAngularWedge,anent,ent);
170 if (anent.IsNull()) return;
171 IGESSolid_ToolRightAngularWedge tool;
172 tool.OwnDump(anent,dumper,S,own);
176 DeclareAndCast(IGESSolid_SelectedComponent,anent,ent);
177 if (anent.IsNull()) return;
178 IGESSolid_ToolSelectedComponent tool;
179 tool.OwnDump(anent,dumper,S,own);
183 DeclareAndCast(IGESSolid_Shell,anent,ent);
184 if (anent.IsNull()) return;
185 IGESSolid_ToolShell tool;
186 tool.OwnDump(anent,dumper,S,own);
190 DeclareAndCast(IGESSolid_SolidAssembly,anent,ent);
191 if (anent.IsNull()) return;
192 IGESSolid_ToolSolidAssembly tool;
193 tool.OwnDump(anent,dumper,S,own);
197 DeclareAndCast(IGESSolid_SolidInstance,anent,ent);
198 if (anent.IsNull()) return;
199 IGESSolid_ToolSolidInstance tool;
200 tool.OwnDump(anent,dumper,S,own);
204 DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,anent,ent);
205 if (anent.IsNull()) return;
206 IGESSolid_ToolSolidOfLinearExtrusion tool;
207 tool.OwnDump(anent,dumper,S,own);
211 DeclareAndCast(IGESSolid_SolidOfRevolution,anent,ent);
212 if (anent.IsNull()) return;
213 IGESSolid_ToolSolidOfRevolution tool;
214 tool.OwnDump(anent,dumper,S,own);
218 DeclareAndCast(IGESSolid_Sphere,anent,ent);
219 if (anent.IsNull()) return;
220 IGESSolid_ToolSphere tool;
221 tool.OwnDump(anent,dumper,S,own);
225 DeclareAndCast(IGESSolid_SphericalSurface,anent,ent);
226 if (anent.IsNull()) return;
227 IGESSolid_ToolSphericalSurface tool;
228 tool.OwnDump(anent,dumper,S,own);
232 DeclareAndCast(IGESSolid_ToroidalSurface,anent,ent);
233 if (anent.IsNull()) return;
234 IGESSolid_ToolToroidalSurface tool;
235 tool.OwnDump(anent,dumper,S,own);
239 DeclareAndCast(IGESSolid_Torus,anent,ent);
240 if (anent.IsNull()) return;
241 IGESSolid_ToolTorus tool;
242 tool.OwnDump(anent,dumper,S,own);
246 DeclareAndCast(IGESSolid_VertexList,anent,ent);
247 if (anent.IsNull()) return;
248 IGESSolid_ToolVertexList tool;
249 tool.OwnDump(anent,dumper,S,own);