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 <Standard_Type.hxx>
69 IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SpecificModule,IGESData_SpecificModule)
71 // Each Module is attached to a Protocol : it must interpret Case Numbers
72 // (arguments <CN> of various methods) in accordance to values returned by
73 // the method TypeNumber from this Protocol
74 IGESSolid_SpecificModule::IGESSolid_SpecificModule() { }
77 void IGESSolid_SpecificModule::OwnDump
78 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
79 const IGESData_IGESDumper& dumper, Standard_OStream& S,
80 const Standard_Integer own) const
84 DeclareAndCast(IGESSolid_Block,anent,ent);
85 if (anent.IsNull()) return;
86 IGESSolid_ToolBlock tool;
87 tool.OwnDump(anent,dumper,S,own);
91 DeclareAndCast(IGESSolid_BooleanTree,anent,ent);
92 if (anent.IsNull()) return;
93 IGESSolid_ToolBooleanTree tool;
94 tool.OwnDump(anent,dumper,S,own);
98 DeclareAndCast(IGESSolid_ConeFrustum,anent,ent);
99 if (anent.IsNull()) return;
100 IGESSolid_ToolConeFrustum tool;
101 tool.OwnDump(anent,dumper,S,own);
105 DeclareAndCast(IGESSolid_ConicalSurface,anent,ent);
106 if (anent.IsNull()) return;
107 IGESSolid_ToolConicalSurface tool;
108 tool.OwnDump(anent,dumper,S,own);
112 DeclareAndCast(IGESSolid_Cylinder,anent,ent);
113 if (anent.IsNull()) return;
114 IGESSolid_ToolCylinder tool;
115 tool.OwnDump(anent,dumper,S,own);
119 DeclareAndCast(IGESSolid_CylindricalSurface,anent,ent);
120 if (anent.IsNull()) return;
121 IGESSolid_ToolCylindricalSurface tool;
122 tool.OwnDump(anent,dumper,S,own);
126 DeclareAndCast(IGESSolid_EdgeList,anent,ent);
127 if (anent.IsNull()) return;
128 IGESSolid_ToolEdgeList tool;
129 tool.OwnDump(anent,dumper,S,own);
133 DeclareAndCast(IGESSolid_Ellipsoid,anent,ent);
134 if (anent.IsNull()) return;
135 IGESSolid_ToolEllipsoid tool;
136 tool.OwnDump(anent,dumper,S,own);
140 DeclareAndCast(IGESSolid_Face,anent,ent);
141 if (anent.IsNull()) return;
142 IGESSolid_ToolFace tool;
143 tool.OwnDump(anent,dumper,S,own);
147 DeclareAndCast(IGESSolid_Loop,anent,ent);
148 if (anent.IsNull()) return;
149 IGESSolid_ToolLoop tool;
150 tool.OwnDump(anent,dumper,S,own);
154 DeclareAndCast(IGESSolid_ManifoldSolid,anent,ent);
155 if (anent.IsNull()) return;
156 IGESSolid_ToolManifoldSolid tool;
157 tool.OwnDump(anent,dumper,S,own);
161 DeclareAndCast(IGESSolid_PlaneSurface,anent,ent);
162 if (anent.IsNull()) return;
163 IGESSolid_ToolPlaneSurface tool;
164 tool.OwnDump(anent,dumper,S,own);
168 DeclareAndCast(IGESSolid_RightAngularWedge,anent,ent);
169 if (anent.IsNull()) return;
170 IGESSolid_ToolRightAngularWedge tool;
171 tool.OwnDump(anent,dumper,S,own);
175 DeclareAndCast(IGESSolid_SelectedComponent,anent,ent);
176 if (anent.IsNull()) return;
177 IGESSolid_ToolSelectedComponent tool;
178 tool.OwnDump(anent,dumper,S,own);
182 DeclareAndCast(IGESSolid_Shell,anent,ent);
183 if (anent.IsNull()) return;
184 IGESSolid_ToolShell tool;
185 tool.OwnDump(anent,dumper,S,own);
189 DeclareAndCast(IGESSolid_SolidAssembly,anent,ent);
190 if (anent.IsNull()) return;
191 IGESSolid_ToolSolidAssembly tool;
192 tool.OwnDump(anent,dumper,S,own);
196 DeclareAndCast(IGESSolid_SolidInstance,anent,ent);
197 if (anent.IsNull()) return;
198 IGESSolid_ToolSolidInstance tool;
199 tool.OwnDump(anent,dumper,S,own);
203 DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,anent,ent);
204 if (anent.IsNull()) return;
205 IGESSolid_ToolSolidOfLinearExtrusion tool;
206 tool.OwnDump(anent,dumper,S,own);
210 DeclareAndCast(IGESSolid_SolidOfRevolution,anent,ent);
211 if (anent.IsNull()) return;
212 IGESSolid_ToolSolidOfRevolution tool;
213 tool.OwnDump(anent,dumper,S,own);
217 DeclareAndCast(IGESSolid_Sphere,anent,ent);
218 if (anent.IsNull()) return;
219 IGESSolid_ToolSphere tool;
220 tool.OwnDump(anent,dumper,S,own);
224 DeclareAndCast(IGESSolid_SphericalSurface,anent,ent);
225 if (anent.IsNull()) return;
226 IGESSolid_ToolSphericalSurface tool;
227 tool.OwnDump(anent,dumper,S,own);
231 DeclareAndCast(IGESSolid_ToroidalSurface,anent,ent);
232 if (anent.IsNull()) return;
233 IGESSolid_ToolToroidalSurface tool;
234 tool.OwnDump(anent,dumper,S,own);
238 DeclareAndCast(IGESSolid_Torus,anent,ent);
239 if (anent.IsNull()) return;
240 IGESSolid_ToolTorus tool;
241 tool.OwnDump(anent,dumper,S,own);
245 DeclareAndCast(IGESSolid_VertexList,anent,ent);
246 if (anent.IsNull()) return;
247 IGESSolid_ToolVertexList tool;
248 tool.OwnDump(anent,dumper,S,own);