File indexing completed on 2025-01-18 10:04:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _ShapePersistent_Geom2d_HeaderFile
0016 #define _ShapePersistent_Geom2d_HeaderFile
0017
0018 #include <ShapePersistent_Geom.hxx>
0019
0020 #include <Geom2d_CartesianPoint.hxx>
0021 #include <Geom2d_Direction.hxx>
0022 #include <Geom2d_VectorWithMagnitude.hxx>
0023 #include <Geom2d_AxisPlacement.hxx>
0024 #include <Geom2d_Transformation.hxx>
0025 #include <Geom2d_Curve.hxx>
0026
0027 class ShapePersistent_Geom2d : public ShapePersistent_Geom
0028 {
0029 typedef geometryBase<Geom2d_Geometry> basic;
0030
0031 public:
0032 typedef ShapePersistent_Geom::Geometry Geometry;
0033
0034 typedef subBase_empty<basic> Point;
0035 typedef instance<Point, Geom2d_CartesianPoint, gp_Pnt2d> CartesianPoint;
0036
0037 typedef subBase_gp<basic, gp_Vec2d> Vector;
0038 typedef instance<Vector, Geom2d_Direction , gp_Dir2d> Direction;
0039 typedef instance<Vector, Geom2d_VectorWithMagnitude, gp_Vec2d> VectorWithMagnitude;
0040
0041 typedef instance<basic, Geom2d_AxisPlacement, gp_Ax2d> AxisPlacement;
0042
0043 typedef instance <SharedBase<Geom2d_Transformation>,
0044 Geom2d_Transformation,
0045 gp_Trsf2d> Transformation;
0046
0047 typedef geometryBase<Geom2d_Curve> Curve;
0048
0049 public:
0050
0051 Standard_EXPORT static Handle(Curve) Translate (const Handle(Geom2d_Curve)& theCurve,
0052 StdObjMgt_TransientPersistentMap& theMap);
0053 };
0054
0055
0056
0057
0058 template<>
0059 inline Standard_CString ShapePersistent_Geom::geometryBase<Geom2d_Geometry>
0060 ::PName() const { return "PGeom2d_Geometry"; }
0061
0062
0063
0064
0065 template<>
0066 inline Standard_CString ShapePersistent_Geom::subBase_empty<ShapePersistent_Geom2d::geometryBase<Geom2d_Geometry> >
0067 ::PName() const { return "PGeom2d_Point"; }
0068
0069
0070
0071
0072 template<>
0073 inline Standard_CString ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Point,
0074 Geom2d_CartesianPoint,
0075 gp_Pnt2d>
0076 ::PName() const { return "PGeom2d_CartesianPoint"; }
0077
0078 template<>
0079 inline void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Point,
0080 Geom2d_CartesianPoint,
0081 gp_Pnt2d>
0082 ::Write(StdObjMgt_WriteData& theWriteData) const
0083 {
0084 Handle(Geom2d_CartesianPoint) aMyGeom =
0085 Handle(Geom2d_CartesianPoint)::DownCast(myTransient);
0086 theWriteData << aMyGeom->Pnt2d();
0087 }
0088
0089
0090
0091
0092 template<>
0093 Standard_CString ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Direction,
0094 Geom2d_Direction,
0095 gp_Dir2d>
0096 ::PName() const;
0097
0098 template<>
0099 void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Direction,
0100 Geom2d_Direction,
0101 gp_Dir2d>
0102 ::Write(StdObjMgt_WriteData& theWriteData) const;
0103
0104
0105
0106
0107 template<>
0108 Standard_CString ShapePersistent_Geom::instance<ShapePersistent_Geom2d::VectorWithMagnitude,
0109 Geom2d_VectorWithMagnitude,
0110 gp_Vec2d>
0111 ::PName() const;
0112
0113 template<>
0114 void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::VectorWithMagnitude,
0115 Geom2d_VectorWithMagnitude,
0116 gp_Vec2d>
0117 ::Write(StdObjMgt_WriteData& theWriteData) const;
0118
0119
0120
0121
0122 template<>
0123 Standard_CString ShapePersistent_Geom::instance<ShapePersistent_Geom2d::AxisPlacement,
0124 Geom2d_AxisPlacement,
0125 gp_Ax2d>
0126 ::PName() const;
0127
0128 template<>
0129 void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::AxisPlacement,
0130 Geom2d_AxisPlacement,
0131 gp_Ax2d>
0132 ::Write(StdObjMgt_WriteData& theWriteData) const;
0133
0134
0135
0136
0137 template<>
0138 Standard_CString ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Transformation,
0139 Geom2d_Transformation,
0140 gp_Trsf2d>
0141 ::PName() const;
0142
0143 template<>
0144 void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Transformation,
0145 Geom2d_Transformation,
0146 gp_Trsf2d>
0147 ::PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const;
0148
0149 template<>
0150 void ShapePersistent_Geom::instance<ShapePersistent_Geom2d::Transformation,
0151 Geom2d_Transformation,
0152 gp_Trsf2d>
0153 ::Write(StdObjMgt_WriteData& theWriteData) const;
0154
0155
0156
0157
0158 template<>
0159 inline Standard_CString ShapePersistent_Geom::geometryBase<Geom2d_Curve>
0160 ::PName() const { return "PGeom2d_Curve"; }
0161
0162 #endif