File indexing completed on 2026-09-24 09:17:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _ShapePersistent_HArray1_HeaderFile
0015 #define _ShapePersistent_HArray1_HeaderFile
0016
0017 #include <StdLPersistent_HArray1.hxx>
0018 #include <StdObject_gp_Vectors.hxx>
0019 #include <StdObject_gp_Curves.hxx>
0020
0021 #include <gp_XYZ.hxx>
0022 #include <NCollection_Array1.hxx>
0023 #include <NCollection_HArray1.hxx>
0024 #include <gp_Pnt.hxx>
0025 #include <gp_Dir.hxx>
0026 #include <gp_Vec.hxx>
0027 #include <gp_XY.hxx>
0028 #include <gp_Pnt2d.hxx>
0029 #include <gp_Dir2d.hxx>
0030 #include <gp_Vec2d.hxx>
0031 #include <gp_Lin2d.hxx>
0032 #include <gp_Circ2d.hxx>
0033 #include <Poly_Triangle.hxx>
0034
0035 class ShapePersistent_HArray1 : private StdLPersistent_HArray1
0036 {
0037 public:
0038 typedef instance<NCollection_HArray1<gp_XYZ>> XYZ;
0039 typedef instance<NCollection_HArray1<gp_Pnt>> Pnt;
0040 typedef instance<NCollection_HArray1<gp_Dir>> Dir;
0041 typedef instance<NCollection_HArray1<gp_Vec>> Vec;
0042 typedef instance<NCollection_HArray1<gp_XY>> XY;
0043 typedef instance<NCollection_HArray1<gp_Pnt2d>> Pnt2d;
0044 typedef instance<NCollection_HArray1<gp_Dir2d>> Dir2d;
0045 typedef instance<NCollection_HArray1<gp_Vec2d>> Vec2d;
0046 typedef instance<NCollection_HArray1<gp_Lin2d>> Lin2d;
0047 typedef instance<NCollection_HArray1<gp_Circ2d>> Circ2d;
0048 typedef instance<NCollection_HArray1<Poly_Triangle>> Triangle;
0049 };
0050
0051 inline StdObjMgt_ReadData& operator>>(StdObjMgt_ReadData& theReadData, Poly_Triangle& theTriangle)
0052 {
0053 StdObjMgt_ReadData::ObjectSentry aSentry(theReadData);
0054
0055 int N1, N2, N3;
0056 theReadData >> N1 >> N2 >> N3;
0057 theTriangle.Set(N1, N2, N3);
0058 return theReadData;
0059 }
0060
0061 inline StdObjMgt_WriteData& operator<<(StdObjMgt_WriteData& theWriteData,
0062 const Poly_Triangle& theTriangle)
0063 {
0064 StdObjMgt_WriteData::ObjectSentry aSentry(theWriteData);
0065
0066 int N1, N2, N3;
0067 theTriangle.Get(N1, N2, N3);
0068 theWriteData << N1 << N2 << N3;
0069 return theWriteData;
0070 }
0071
0072 #endif