File indexing completed on 2026-09-20 09:19:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _StdObject_gp_Vectors_HeaderFile
0015 #define _StdObject_gp_Vectors_HeaderFile
0016
0017 #include <StdObjMgt_ReadData.hxx>
0018 #include <StdObjMgt_WriteData.hxx>
0019
0020 #include <gp_Pnt2d.hxx>
0021 #include <gp_Vec2d.hxx>
0022 #include <gp_Dir2d.hxx>
0023 #include <gp_Pnt.hxx>
0024 #include <gp_Vec.hxx>
0025 #include <gp_Dir.hxx>
0026
0027 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_XY& theXY)
0028 {
0029 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0030
0031 double aX, aY;
0032 theReadData >> aX >> aY;
0033 theXY.SetCoord(aX, aY);
0034 return theReadData;
0035 }
0036
0037 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_XY& theXY)
0038 {
0039 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0040
0041 double aX = theXY.X(), aY = theXY.Y();
0042 theWriteData << aX << aY;
0043 return theWriteData;
0044 }
0045
0046 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Pnt2d& thePnt)
0047 {
0048 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0049
0050 gp_XY aXY;
0051 theReadData >> aXY;
0052 thePnt.SetXY(aXY);
0053 return theReadData;
0054 }
0055
0056 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Pnt2d& thePnt)
0057 {
0058 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0059
0060 theWriteData << thePnt.XY();
0061 return theWriteData;
0062 }
0063
0064 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Vec2d& theVec)
0065 {
0066 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0067
0068 gp_XY aXY;
0069 theReadData >> aXY;
0070 theVec.SetXY(aXY);
0071 return theReadData;
0072 }
0073
0074 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Vec2d& theVec)
0075 {
0076 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0077
0078 theWriteData << theVec.XY();
0079 return theWriteData;
0080 }
0081
0082 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Dir2d& theDir)
0083 {
0084 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0085
0086 gp_XY aXY;
0087 theReadData >> aXY;
0088 theDir.SetXY(aXY);
0089 return theReadData;
0090 }
0091
0092 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Dir2d& theDir)
0093 {
0094 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0095
0096 theWriteData << theDir.XY();
0097 return theWriteData;
0098 }
0099
0100 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_XYZ& theXYZ)
0101 {
0102 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0103
0104 double aX, aY, aZ;
0105 theReadData >> aX >> aY >> aZ;
0106 theXYZ.SetCoord(aX, aY, aZ);
0107 return theReadData;
0108 }
0109
0110 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_XYZ& theXYZ)
0111 {
0112 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0113
0114 double aX = theXYZ.X(), aY = theXYZ.Y(), aZ = theXYZ.Z();
0115 theWriteData << aX << aY << aZ;
0116 return theWriteData;
0117 }
0118
0119 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Pnt& thePnt)
0120 {
0121 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0122
0123 gp_XYZ aXYZ;
0124 theReadData >> aXYZ;
0125 thePnt.SetXYZ(aXYZ);
0126 return theReadData;
0127 }
0128
0129 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Pnt& thePnt)
0130 {
0131 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0132
0133 theWriteData << thePnt.XYZ();
0134 return theWriteData;
0135 }
0136
0137 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Vec& theVec)
0138 {
0139 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0140
0141 gp_XYZ aXYZ;
0142 theReadData >> aXYZ;
0143 theVec.SetXYZ(aXYZ);
0144 return theReadData;
0145 }
0146
0147 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Vec& theVec)
0148 {
0149 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0150
0151 theWriteData << theVec.XYZ();
0152 return theWriteData;
0153 }
0154
0155 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, gp_Dir& theDir)
0156 {
0157 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0158
0159 gp_XYZ aXYZ;
0160 theReadData >> aXYZ;
0161 theDir.SetXYZ(aXYZ);
0162 return theReadData;
0163 }
0164
0165 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData, const gp_Dir& theDir)
0166 {
0167 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0168
0169 theWriteData << theDir.XYZ();
0170 return theWriteData;
0171 }
0172
0173 #endif