Salome HOME
0020511: EDF 1101 SMESH : Add CGNS to Mesh Format Supported
authoreap <eap@opencascade.com>
Wed, 10 Aug 2011 09:54:13 +0000 (09:54 +0000)
committereap <eap@opencascade.com>
Wed, 10 Aug 2011 09:54:13 +0000 (09:54 +0000)
+  inline SMDS_MeshInfo& operator=(const SMDS_MeshInfo& other);

src/SMDS/SMDS_MeshInfo.hxx

index 54f1bfb2718e3892a94fca59d3ffce9ee0c2369f..55a729b7ba3eae1e62e19b8628b23c9578849ade 100644 (file)
@@ -35,6 +35,7 @@ class SMDS_EXPORT SMDS_MeshInfo
 public:
 
   inline SMDS_MeshInfo();
+  inline SMDS_MeshInfo& operator=(const SMDS_MeshInfo& other);
   inline void Clear();
 
   int NbNodes() const { return myNbNodes; }
@@ -161,6 +162,14 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
   myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas;   
 }
 
+inline SMDS_MeshInfo& // operator=
+SMDS_MeshInfo::operator=(const SMDS_MeshInfo& other)
+{ for ( int i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=(*other.myNb[i]);
+  myNbPolygons = other.myNbPolygons;
+  myNbPolyhedrons = other.myNbPolyhedrons;
+  return *this;
+}
+
 inline void // Clear
 SMDS_MeshInfo::Clear()
 { for ( int i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=0;