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