973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <IGESData_IGESDumper.hxx> |
16 | #include <IGESData_IGESEntity.hxx> |
7fd59977 |
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> |
42cf5bc1 |
36 | #include <IGESSolid_SpecificModule.hxx> |
7fd59977 |
37 | #include <IGESSolid_Sphere.hxx> |
38 | #include <IGESSolid_SphericalSurface.hxx> |
7fd59977 |
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> |
42cf5bc1 |
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> |
7fd59977 |
69 | |
92efcf78 |
70 | IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SpecificModule,IGESData_SpecificModule) |
71 | |
7fd59977 |
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 |
b311480e |
75 | IGESSolid_SpecificModule::IGESSolid_SpecificModule() { } |
7fd59977 |
76 | |
77 | |
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 |
82 | { |
83 | switch (CN) { |
84 | case 1 : { |
85 | DeclareAndCast(IGESSolid_Block,anent,ent); |
86 | if (anent.IsNull()) return; |
87 | IGESSolid_ToolBlock tool; |
88 | tool.OwnDump(anent,dumper,S,own); |
89 | } |
90 | break; |
91 | case 2 : { |
92 | DeclareAndCast(IGESSolid_BooleanTree,anent,ent); |
93 | if (anent.IsNull()) return; |
94 | IGESSolid_ToolBooleanTree tool; |
95 | tool.OwnDump(anent,dumper,S,own); |
96 | } |
97 | break; |
98 | case 3 : { |
99 | DeclareAndCast(IGESSolid_ConeFrustum,anent,ent); |
100 | if (anent.IsNull()) return; |
101 | IGESSolid_ToolConeFrustum tool; |
102 | tool.OwnDump(anent,dumper,S,own); |
103 | } |
104 | break; |
105 | case 4 : { |
106 | DeclareAndCast(IGESSolid_ConicalSurface,anent,ent); |
107 | if (anent.IsNull()) return; |
108 | IGESSolid_ToolConicalSurface tool; |
109 | tool.OwnDump(anent,dumper,S,own); |
110 | } |
111 | break; |
112 | case 5 : { |
113 | DeclareAndCast(IGESSolid_Cylinder,anent,ent); |
114 | if (anent.IsNull()) return; |
115 | IGESSolid_ToolCylinder tool; |
116 | tool.OwnDump(anent,dumper,S,own); |
117 | } |
118 | break; |
119 | case 6 : { |
120 | DeclareAndCast(IGESSolid_CylindricalSurface,anent,ent); |
121 | if (anent.IsNull()) return; |
122 | IGESSolid_ToolCylindricalSurface tool; |
123 | tool.OwnDump(anent,dumper,S,own); |
124 | } |
125 | break; |
126 | case 7 : { |
127 | DeclareAndCast(IGESSolid_EdgeList,anent,ent); |
128 | if (anent.IsNull()) return; |
129 | IGESSolid_ToolEdgeList tool; |
130 | tool.OwnDump(anent,dumper,S,own); |
131 | } |
132 | break; |
133 | case 8 : { |
134 | DeclareAndCast(IGESSolid_Ellipsoid,anent,ent); |
135 | if (anent.IsNull()) return; |
136 | IGESSolid_ToolEllipsoid tool; |
137 | tool.OwnDump(anent,dumper,S,own); |
138 | } |
139 | break; |
140 | case 9 : { |
141 | DeclareAndCast(IGESSolid_Face,anent,ent); |
142 | if (anent.IsNull()) return; |
143 | IGESSolid_ToolFace tool; |
144 | tool.OwnDump(anent,dumper,S,own); |
145 | } |
146 | break; |
147 | case 10 : { |
148 | DeclareAndCast(IGESSolid_Loop,anent,ent); |
149 | if (anent.IsNull()) return; |
150 | IGESSolid_ToolLoop tool; |
151 | tool.OwnDump(anent,dumper,S,own); |
152 | } |
153 | break; |
154 | case 11 : { |
155 | DeclareAndCast(IGESSolid_ManifoldSolid,anent,ent); |
156 | if (anent.IsNull()) return; |
157 | IGESSolid_ToolManifoldSolid tool; |
158 | tool.OwnDump(anent,dumper,S,own); |
159 | } |
160 | break; |
161 | case 12 : { |
162 | DeclareAndCast(IGESSolid_PlaneSurface,anent,ent); |
163 | if (anent.IsNull()) return; |
164 | IGESSolid_ToolPlaneSurface tool; |
165 | tool.OwnDump(anent,dumper,S,own); |
166 | } |
167 | break; |
168 | case 13 : { |
169 | DeclareAndCast(IGESSolid_RightAngularWedge,anent,ent); |
170 | if (anent.IsNull()) return; |
171 | IGESSolid_ToolRightAngularWedge tool; |
172 | tool.OwnDump(anent,dumper,S,own); |
173 | } |
174 | break; |
175 | case 14 : { |
176 | DeclareAndCast(IGESSolid_SelectedComponent,anent,ent); |
177 | if (anent.IsNull()) return; |
178 | IGESSolid_ToolSelectedComponent tool; |
179 | tool.OwnDump(anent,dumper,S,own); |
180 | } |
181 | break; |
182 | case 15 : { |
183 | DeclareAndCast(IGESSolid_Shell,anent,ent); |
184 | if (anent.IsNull()) return; |
185 | IGESSolid_ToolShell tool; |
186 | tool.OwnDump(anent,dumper,S,own); |
187 | } |
188 | break; |
189 | case 16 : { |
190 | DeclareAndCast(IGESSolid_SolidAssembly,anent,ent); |
191 | if (anent.IsNull()) return; |
192 | IGESSolid_ToolSolidAssembly tool; |
193 | tool.OwnDump(anent,dumper,S,own); |
194 | } |
195 | break; |
196 | case 17 : { |
197 | DeclareAndCast(IGESSolid_SolidInstance,anent,ent); |
198 | if (anent.IsNull()) return; |
199 | IGESSolid_ToolSolidInstance tool; |
200 | tool.OwnDump(anent,dumper,S,own); |
201 | } |
202 | break; |
203 | case 18 : { |
204 | DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,anent,ent); |
205 | if (anent.IsNull()) return; |
206 | IGESSolid_ToolSolidOfLinearExtrusion tool; |
207 | tool.OwnDump(anent,dumper,S,own); |
208 | } |
209 | break; |
210 | case 19 : { |
211 | DeclareAndCast(IGESSolid_SolidOfRevolution,anent,ent); |
212 | if (anent.IsNull()) return; |
213 | IGESSolid_ToolSolidOfRevolution tool; |
214 | tool.OwnDump(anent,dumper,S,own); |
215 | } |
216 | break; |
217 | case 20 : { |
218 | DeclareAndCast(IGESSolid_Sphere,anent,ent); |
219 | if (anent.IsNull()) return; |
220 | IGESSolid_ToolSphere tool; |
221 | tool.OwnDump(anent,dumper,S,own); |
222 | } |
223 | break; |
224 | case 21 : { |
225 | DeclareAndCast(IGESSolid_SphericalSurface,anent,ent); |
226 | if (anent.IsNull()) return; |
227 | IGESSolid_ToolSphericalSurface tool; |
228 | tool.OwnDump(anent,dumper,S,own); |
229 | } |
230 | break; |
231 | case 22 : { |
232 | DeclareAndCast(IGESSolid_ToroidalSurface,anent,ent); |
233 | if (anent.IsNull()) return; |
234 | IGESSolid_ToolToroidalSurface tool; |
235 | tool.OwnDump(anent,dumper,S,own); |
236 | } |
237 | break; |
238 | case 23 : { |
239 | DeclareAndCast(IGESSolid_Torus,anent,ent); |
240 | if (anent.IsNull()) return; |
241 | IGESSolid_ToolTorus tool; |
242 | tool.OwnDump(anent,dumper,S,own); |
243 | } |
244 | break; |
245 | case 24 : { |
246 | DeclareAndCast(IGESSolid_VertexList,anent,ent); |
247 | if (anent.IsNull()) return; |
248 | IGESSolid_ToolVertexList tool; |
249 | tool.OwnDump(anent,dumper,S,own); |
250 | } |
251 | break; |
252 | default : break; |
253 | } |
254 | } |