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.
15 #ifndef _StdObject_gp_Vectors_HeaderFile
16 #define _StdObject_gp_Vectors_HeaderFile
19 #include <StdObjMgt_ReadData.hxx>
20 #include <StdObjMgt_WriteData.hxx>
22 #include <gp_Pnt2d.hxx>
23 #include <gp_Vec2d.hxx>
24 #include <gp_Dir2d.hxx>
30 inline StdObjMgt_ReadData& operator >>
31 (StdObjMgt_ReadData::Object theReadData, gp_XY& theXY)
34 theReadData >> aX >> aY;
35 theXY.SetCoord (aX, aY);
39 inline StdObjMgt_WriteData& operator <<
40 (StdObjMgt_WriteData::Object theWriteData, const gp_XY& theXY)
42 Standard_Real aX = theXY.X(), aY = theXY.Y();
43 theWriteData << aX << aY;
47 inline StdObjMgt_ReadData& operator >>
48 (StdObjMgt_ReadData::Object theReadData, gp_Pnt2d& thePnt)
56 inline StdObjMgt_WriteData& operator <<
57 (StdObjMgt_WriteData::Object theWriteData, const gp_Pnt2d& thePnt)
59 theWriteData << thePnt.XY();
63 inline StdObjMgt_ReadData& operator >>
64 (StdObjMgt_ReadData::Object theReadData, gp_Vec2d& theVec)
72 inline StdObjMgt_WriteData& operator <<
73 (StdObjMgt_WriteData::Object theWriteData, const gp_Vec2d& theVec)
75 theWriteData << theVec.XY();
79 inline StdObjMgt_ReadData& operator >>
80 (StdObjMgt_ReadData::Object theReadData, gp_Dir2d& theDir)
88 inline StdObjMgt_WriteData& operator <<
89 (StdObjMgt_WriteData::Object theWriteData, const gp_Dir2d& theDir)
91 theWriteData << theDir.XY();
95 inline StdObjMgt_ReadData& operator >>
96 (StdObjMgt_ReadData::Object theReadData, gp_XYZ& theXYZ)
98 Standard_Real aX, aY, aZ;
99 theReadData >> aX >> aY >> aZ;
100 theXYZ.SetCoord(aX, aY, aZ);
104 inline StdObjMgt_WriteData& operator <<
105 (StdObjMgt_WriteData::Object theWriteData, const gp_XYZ& theXYZ)
107 Standard_Real aX = theXYZ.X(), aY = theXYZ.Y(), aZ = theXYZ.Z();
108 theWriteData << aX << aY << aZ;
112 inline StdObjMgt_ReadData& operator >>
113 (StdObjMgt_ReadData::Object theReadData, gp_Pnt& thePnt)
117 thePnt.SetXYZ (aXYZ);
121 inline StdObjMgt_WriteData& operator <<
122 (StdObjMgt_WriteData::Object theWriteData, const gp_Pnt& thePnt)
124 theWriteData << thePnt.XYZ();
128 inline StdObjMgt_ReadData& operator >>
129 (StdObjMgt_ReadData::Object theReadData, gp_Vec& theVec)
133 theVec.SetXYZ (aXYZ);
137 inline StdObjMgt_WriteData& operator <<
138 (StdObjMgt_WriteData::Object theWriteData, const gp_Vec& theVec)
140 theWriteData << theVec.XYZ();
144 inline StdObjMgt_ReadData& operator >>
145 (StdObjMgt_ReadData::Object theReadData, gp_Dir& theDir)
153 inline StdObjMgt_WriteData& operator <<
154 (StdObjMgt_WriteData::Object theWriteData, const gp_Dir& theDir)
156 theWriteData << theDir.XYZ();