Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:57

0001 // Copyright (c) 2015 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 
0015 #ifndef _ShapePersistent_HArray1_HeaderFile
0016 #define _ShapePersistent_HArray1_HeaderFile
0017 
0018 #include <StdLPersistent_HArray1.hxx>
0019 #include <StdObject_gp_Vectors.hxx>
0020 #include <StdObject_gp_Curves.hxx>
0021 
0022 #include <TColgp_HArray1OfXYZ.hxx>
0023 #include <TColgp_HArray1OfPnt.hxx>
0024 #include <TColgp_HArray1OfDir.hxx>
0025 #include <TColgp_HArray1OfVec.hxx>
0026 #include <TColgp_HArray1OfXY.hxx>
0027 #include <TColgp_HArray1OfPnt2d.hxx>
0028 #include <TColgp_HArray1OfDir2d.hxx>
0029 #include <TColgp_HArray1OfVec2d.hxx>
0030 #include <TColgp_HArray1OfLin2d.hxx>
0031 #include <TColgp_HArray1OfCirc2d.hxx>
0032 #include <Poly_HArray1OfTriangle.hxx>
0033 
0034 
0035 class ShapePersistent_HArray1 : private StdLPersistent_HArray1
0036 {
0037 public:
0038   typedef instance<TColgp_HArray1OfXYZ>    XYZ;
0039   typedef instance<TColgp_HArray1OfPnt>    Pnt;
0040   typedef instance<TColgp_HArray1OfDir>    Dir;
0041   typedef instance<TColgp_HArray1OfVec>    Vec;
0042   typedef instance<TColgp_HArray1OfXY>     XY;
0043   typedef instance<TColgp_HArray1OfPnt2d>  Pnt2d;
0044   typedef instance<TColgp_HArray1OfDir2d>  Dir2d;
0045   typedef instance<TColgp_HArray1OfVec2d>  Vec2d;
0046   typedef instance<TColgp_HArray1OfLin2d>  Lin2d;
0047   typedef instance<TColgp_HArray1OfCirc2d> Circ2d;
0048   typedef instance<Poly_HArray1OfTriangle> Triangle;
0049 };
0050 
0051 inline StdObjMgt_ReadData& operator >>
0052   (StdObjMgt_ReadData& theReadData, Poly_Triangle& theTriangle)
0053 {
0054   StdObjMgt_ReadData::ObjectSentry aSentry (theReadData);
0055 
0056   Standard_Integer N1, N2, N3;
0057   theReadData >> N1 >> N2 >> N3;
0058   theTriangle.Set (N1, N2, N3);
0059   return theReadData;
0060 }
0061 
0062 inline StdObjMgt_WriteData& operator <<
0063   (StdObjMgt_WriteData& theWriteData, const Poly_Triangle& theTriangle)
0064 {
0065   StdObjMgt_WriteData::ObjectSentry aSentry (theWriteData);
0066 
0067   Standard_Integer N1, N2, N3;
0068   theTriangle.Get(N1, N2, N3);
0069   theWriteData << N1 << N2 << N3;
0070   return theWriteData;
0071 }
0072 
0073 #endif