1 // Copyright (c) 2015 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.
14 #include <ShapePersistent.hxx>
15 #include <ShapePersistent_Geom.hxx>
16 #include <ShapePersistent_Geom2d.hxx>
17 #include <StdObjMgt_MapOfInstantiators.hxx>
19 #include <StdLPersistent_HArray1.hxx>
20 #include <StdLPersistent_HArray2.hxx>
21 #include <StdPersistent_TopoDS.hxx>
22 #include <ShapePersistent_TopoDS.hxx>
23 #include <ShapePersistent_HArray1.hxx>
24 #include <ShapePersistent_HArray2.hxx>
25 #include <ShapePersistent_HSequence.hxx>
26 #include <ShapePersistent_Geom2d.hxx>
27 #include <ShapePersistent_Geom2d_Curve.hxx>
28 #include <ShapePersistent_Geom.hxx>
29 #include <ShapePersistent_Geom_Curve.hxx>
30 #include <ShapePersistent_Geom_Surface.hxx>
31 #include <ShapePersistent_Poly.hxx>
32 #include <ShapePersistent_BRep.hxx>
35 //=======================================================================
36 //function : BindTypes
37 //purpose : Register types
38 //=======================================================================
39 void ShapePersistent::BindTypes (StdObjMgt_MapOfInstantiators& theMap)
41 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PTopoDS_HArray1OfHShape");
42 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfCurve");
43 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfBoundedCurve");
44 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfBezierCurve");
45 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfBSplineCurve");
46 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfSurface");
47 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom_HArray1OfBoundedSurface");
48 theMap.Bind <StdLPersistent_HArray2::Persistent> ("PColPGeom_HArray2OfSurface");
49 theMap.Bind <StdLPersistent_HArray2::Persistent> ("PColPGeom_HArray2OfBoundedSurface");
50 theMap.Bind <StdLPersistent_HArray2::Persistent> ("PColPGeom_HArray2OfBezierSurface");
51 theMap.Bind <StdLPersistent_HArray2::Persistent> ("PColPGeom_HArray2OfBSplineSurface");
52 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom2d_HArray1OfCurve");
53 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom2d_HArray1OfBoundedCurve");
54 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom2d_HArray1OfBezierCurve");
55 theMap.Bind <StdLPersistent_HArray1::Persistent> ("PColPGeom2d_HArray1OfBSplineCurve");
57 theMap.Bind <StdLPersistent_HArray2::Real> ("PColStd_HArray2OfReal");
59 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_HShape");
60 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Vertex");
61 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Edge");
62 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Wire");
63 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Face");
64 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Shell");
65 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Solid");
66 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_CompSolid");
67 theMap.Bind <ShapePersistent_TopoDS::HShape> ("PTopoDS_Compound");
69 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TShape");
71 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TVertex");
72 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TVertex1");
73 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TEdge");
74 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TEdge1");
75 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TFace");
76 theMap.Bind <StdPersistent_TopoDS::TShape> ("PTopoDS_TFace1");
78 theMap.Bind <ShapePersistent_TopoDS::TWire> ("PTopoDS_TWire");
79 theMap.Bind <ShapePersistent_TopoDS::TWire1> ("PTopoDS_TWire1");
80 theMap.Bind <ShapePersistent_TopoDS::TShell> ("PTopoDS_TShell");
81 theMap.Bind <ShapePersistent_TopoDS::TShell1> ("PTopoDS_TShell1");
82 theMap.Bind <ShapePersistent_TopoDS::TSolid> ("PTopoDS_TSolid");
83 theMap.Bind <ShapePersistent_TopoDS::TSolid1> ("PTopoDS_TSolid1");
84 theMap.Bind <ShapePersistent_TopoDS::TCompSolid> ("PTopoDS_TCompSolid");
85 theMap.Bind <ShapePersistent_TopoDS::TCompSolid1> ("PTopoDS_TCompSolid1");
86 theMap.Bind <ShapePersistent_TopoDS::TCompound> ("PTopoDS_TCompound");
87 theMap.Bind <ShapePersistent_TopoDS::TCompound1> ("PTopoDS_TCompound1");
89 theMap.Bind <ShapePersistent_HArray1::XYZ> ("PColgp_HArray1OfXYZ");
90 theMap.Bind <ShapePersistent_HArray1::Pnt> ("PColgp_HArray1OfPnt");
91 theMap.Bind <ShapePersistent_HArray1::Dir> ("PColgp_HArray1OfDir");
92 theMap.Bind <ShapePersistent_HArray1::Vec> ("PColgp_HArray1OfVec");
93 theMap.Bind <ShapePersistent_HArray1::XY> ("PColgp_HArray1OfXY");
94 theMap.Bind <ShapePersistent_HArray1::Pnt2d> ("PColgp_HArray1OfPnt2d");
95 theMap.Bind <ShapePersistent_HArray1::Dir2d> ("PColgp_HArray1OfDir2d");
96 theMap.Bind <ShapePersistent_HArray1::Vec2d> ("PColgp_HArray1OfVec2d");
97 theMap.Bind <ShapePersistent_HArray1::Lin2d> ("PColgp_HArray1OfLin2d");
98 theMap.Bind <ShapePersistent_HArray1::Circ2d> ("PColgp_HArray1OfCirc2d");
99 theMap.Bind <ShapePersistent_HArray1::Triangle> ("PPoly_HArray1OfTriangle");
101 theMap.Bind <ShapePersistent_HArray2::XYZ> ("PColgp_HArray2OfXYZ");
102 theMap.Bind <ShapePersistent_HArray2::Pnt> ("PColgp_HArray2OfPnt");
103 theMap.Bind <ShapePersistent_HArray2::Dir> ("PColgp_HArray2OfDir");
104 theMap.Bind <ShapePersistent_HArray2::Vec> ("PColgp_HArray2OfVec");
105 theMap.Bind <ShapePersistent_HArray2::XY> ("PColgp_HArray2OfXY");
106 theMap.Bind <ShapePersistent_HArray2::Pnt2d> ("PColgp_HArray2OfPnt2d");
107 theMap.Bind <ShapePersistent_HArray2::Dir2d> ("PColgp_HArray2OfDir2d");
108 theMap.Bind <ShapePersistent_HArray2::Vec2d> ("PColgp_HArray2OfVec2d");
109 theMap.Bind <ShapePersistent_HArray2::Lin2d> ("PColgp_HArray2OfLin2d");
110 theMap.Bind <ShapePersistent_HArray2::Circ2d> ("PColgp_HArray2OfCirc2d");
112 theMap.Bind <ShapePersistent_HSequence::XYZ> ("PColgp_HSequenceOfXYZ");
113 theMap.Bind <ShapePersistent_HSequence::Pnt> ("PColgp_HSequenceOfPnt");
114 theMap.Bind <ShapePersistent_HSequence::Dir> ("PColgp_HSequenceOfDir");
115 theMap.Bind <ShapePersistent_HSequence::Vec> ("PColgp_HSequenceOfVec");
117 theMap.Bind <ShapePersistent_HSequence::XYZ::Node>
118 ("PColgp_SeqNodeOfHSequenceOfXYZ");
120 theMap.Bind <ShapePersistent_HSequence::Pnt::Node>
121 ("PColgp_SeqNodeOfHSequenceOfPnt");
123 theMap.Bind <ShapePersistent_HSequence::Dir::Node>
124 ("PColgp_SeqNodeOfHSequenceOfDir");
126 theMap.Bind <ShapePersistent_HSequence::Vec::Node>
127 ("PColgp_SeqNodeOfHSequenceOfVec");
129 theMap.Bind <ShapePersistent_Geom2d::Transformation>
130 ("PGeom2d_Transformation");
132 theMap.Bind <ShapePersistent_Geom2d::Geometry>
133 ("PGeom2d_Geometry");
135 theMap.Bind <ShapePersistent_Geom2d::Point>
138 theMap.Bind <ShapePersistent_Geom2d::CartesianPoint>
139 ("PGeom2d_CartesianPoint");
141 theMap.Bind <ShapePersistent_Geom2d::Vector>
144 theMap.Bind <ShapePersistent_Geom2d::Direction>
145 ("PGeom2d_Direction");
147 theMap.Bind <ShapePersistent_Geom2d::VectorWithMagnitude>
148 ("PGeom2d_VectorWithMagnitude");
150 theMap.Bind <ShapePersistent_Geom2d::AxisPlacement>
151 ("PGeom2d_AxisPlacement");
153 theMap.Bind <ShapePersistent_Geom2d::Curve>
156 theMap.Bind <ShapePersistent_Geom2d_Curve::Line>
159 theMap.Bind <ShapePersistent_Geom2d_Curve::Conic>
162 theMap.Bind <ShapePersistent_Geom2d_Curve::Circle>
165 theMap.Bind <ShapePersistent_Geom2d_Curve::Ellipse>
168 theMap.Bind <ShapePersistent_Geom2d_Curve::Hyperbola>
169 ("PGeom2d_Hyperbola");
171 theMap.Bind <ShapePersistent_Geom2d_Curve::Parabola>
172 ("PGeom2d_Parabola");
174 theMap.Bind <ShapePersistent_Geom2d_Curve::Bounded>
175 ("PGeom2d_BoundedCurve");
177 theMap.Bind <ShapePersistent_Geom2d_Curve::Bezier>
178 ("PGeom2d_BezierCurve");
180 theMap.Bind <ShapePersistent_Geom2d_Curve::BSpline>
181 ("PGeom2d_BSplineCurve");
183 theMap.Bind <ShapePersistent_Geom2d_Curve::Trimmed>
184 ("PGeom2d_TrimmedCurve");
186 theMap.Bind <ShapePersistent_Geom2d_Curve::Offset>
187 ("PGeom2d_OffsetCurve");
189 theMap.Bind <ShapePersistent_Geom::Transformation>
190 ("PGeom_Transformation");
192 theMap.Bind <ShapePersistent_Geom::Geometry>
195 theMap.Bind <ShapePersistent_Geom::Point>
198 theMap.Bind <ShapePersistent_Geom::CartesianPoint>
199 ("PGeom_CartesianPoint");
201 theMap.Bind <ShapePersistent_Geom::Vector>
204 theMap.Bind <ShapePersistent_Geom::Direction>
207 theMap.Bind <ShapePersistent_Geom::VectorWithMagnitude>
208 ("PGeom_VectorWithMagnitude");
210 theMap.Bind <ShapePersistent_Geom::AxisPlacement>
211 ("PGeom_AxisPlacement");
213 theMap.Bind <ShapePersistent_Geom::Axis1Placement>
214 ("PGeom_Axis1Placement");
216 theMap.Bind <ShapePersistent_Geom::Axis2Placement>
217 ("PGeom_Axis2Placement");
219 theMap.Bind <ShapePersistent_Geom::Curve>
222 theMap.Bind <ShapePersistent_Geom_Curve::Line>
225 theMap.Bind <ShapePersistent_Geom_Curve::Conic>
228 theMap.Bind <ShapePersistent_Geom_Curve::Circle>
231 theMap.Bind <ShapePersistent_Geom_Curve::Ellipse>
234 theMap.Bind <ShapePersistent_Geom_Curve::Hyperbola>
237 theMap.Bind <ShapePersistent_Geom_Curve::Parabola>
240 theMap.Bind <ShapePersistent_Geom_Curve::Bounded>
241 ("PGeom_BoundedCurve");
243 theMap.Bind <ShapePersistent_Geom_Curve::Bezier>
244 ("PGeom_BezierCurve");
246 theMap.Bind <ShapePersistent_Geom_Curve::BSpline>
247 ("PGeom_BSplineCurve");
249 theMap.Bind <ShapePersistent_Geom_Curve::Trimmed>
250 ("PGeom_TrimmedCurve");
252 theMap.Bind <ShapePersistent_Geom_Curve::Offset>
253 ("PGeom_OffsetCurve");
255 theMap.Bind <ShapePersistent_Geom::Surface>
258 theMap.Bind <ShapePersistent_Geom_Surface::Elementary>
259 ("PGeom_ElementarySurface");
261 theMap.Bind <ShapePersistent_Geom_Surface::Plane>
264 theMap.Bind <ShapePersistent_Geom_Surface::Conical>
265 ("PGeom_ConicalSurface");
267 theMap.Bind <ShapePersistent_Geom_Surface::Cylindrical>
268 ("PGeom_CylindricalSurface");
270 theMap.Bind <ShapePersistent_Geom_Surface::Spherical>
271 ("PGeom_SphericalSurface");
273 theMap.Bind <ShapePersistent_Geom_Surface::Toroidal>
274 ("PGeom_ToroidalSurface");
276 theMap.Bind <ShapePersistent_Geom_Surface::Swept>
277 ("PGeom_SweptSurface");
279 theMap.Bind <ShapePersistent_Geom_Surface::LinearExtrusion>
280 ("PGeom_SurfaceOfLinearExtrusion");
282 theMap.Bind <ShapePersistent_Geom_Surface::Revolution>
283 ("PGeom_SurfaceOfRevolution");
285 theMap.Bind <ShapePersistent_Geom_Surface::Bounded>
286 ("PGeom_BoundedSurface");
288 theMap.Bind <ShapePersistent_Geom_Surface::Bezier>
289 ("PGeom_BezierSurface");
291 theMap.Bind <ShapePersistent_Geom_Surface::BSpline>
292 ("PGeom_BSplineSurface");
294 theMap.Bind <ShapePersistent_Geom_Surface::RectangularTrimmed>
295 ("PGeom_RectangularTrimmedSurface");
297 theMap.Bind <ShapePersistent_Geom_Surface::Offset>
298 ("PGeom_OffsetSurface");
300 theMap.Bind <ShapePersistent_Poly::Polygon2D>
303 theMap.Bind <ShapePersistent_Poly::Polygon3D>
306 theMap.Bind <ShapePersistent_Poly::PolygonOnTriangulation>
307 ("PPoly_PolygonOnTriangulation");
309 theMap.Bind <ShapePersistent_Poly::Triangulation>
310 ("PPoly_Triangulation");
312 theMap.Bind <ShapePersistent_BRep::PointRepresentation>
313 ("PBRep_PointRepresentation");
315 theMap.Bind <ShapePersistent_BRep::PointOnCurve>
316 ("PBRep_PointOnCurve");
318 theMap.Bind <ShapePersistent_BRep::PointsOnSurface>
319 ("PBRep_PointsOnSurface");
321 theMap.Bind <ShapePersistent_BRep::PointOnCurveOnSurface>
322 ("PBRep_PointOnCurveOnSurface");
324 theMap.Bind <ShapePersistent_BRep::PointOnSurface>
325 ("PBRep_PointOnSurface");
327 theMap.Bind <ShapePersistent_BRep::CurveRepresentation>
328 ("PBRep_CurveRepresentation");
330 theMap.Bind <ShapePersistent_BRep::GCurve>
333 theMap.Bind <ShapePersistent_BRep::Curve3D>
336 theMap.Bind <ShapePersistent_BRep::CurveOnSurface>
337 ("PBRep_CurveOnSurface");
339 theMap.Bind <ShapePersistent_BRep::CurveOnClosedSurface>
340 ("PBRep_CurveOnClosedSurface");
342 theMap.Bind <ShapePersistent_BRep::Polygon3D>
345 theMap.Bind <ShapePersistent_BRep::PolygonOnTriangulation>
346 ("PBRep_PolygonOnTriangulation");
348 theMap.Bind <ShapePersistent_BRep::PolygonOnClosedTriangulation>
349 ("PBRep_PolygonOnClosedTriangulation");
351 theMap.Bind <ShapePersistent_BRep::PolygonOnSurface>
352 ("PBRep_PolygonOnSurface");
354 theMap.Bind <ShapePersistent_BRep::PolygonOnClosedSurface>
355 ("PBRep_PolygonOnClosedSurface");
357 theMap.Bind <ShapePersistent_BRep::CurveOn2Surfaces>
358 ("PBRep_CurveOn2Surfaces");
360 theMap.Bind <ShapePersistent_BRep::TVertex> ("PBRep_TVertex");
361 theMap.Bind <ShapePersistent_BRep::TVertex1> ("PBRep_TVertex1");
362 theMap.Bind <ShapePersistent_BRep::TEdge> ("PBRep_TEdge");
363 theMap.Bind <ShapePersistent_BRep::TEdge1> ("PBRep_TEdge1");
364 theMap.Bind <ShapePersistent_BRep::TFace> ("PBRep_TFace");
365 theMap.Bind <ShapePersistent_BRep::TFace1> ("PBRep_TFace1");