X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_SubMesh.hxx;h=8550561aaef3f15b7080a7df0afbdcfe0a31651c;hp=f25ebfe9de4efa87a89ec6013ebc0c53c25c5625;hb=refs%2Ftags%2FV9_7_0a1;hpb=3781c2c7d624bcb660e9e2ca4d6329f7f3aa0f53 diff --git a/src/SMESHDS/SMESHDS_SubMesh.hxx b/src/SMESHDS/SMESHDS_SubMesh.hxx index f25ebfe9d..8550561aa 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.hxx +++ b/src/SMESHDS/SMESHDS_SubMesh.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -31,6 +31,7 @@ #include "SMDS_ElementHolder.hxx" #include "SMDS_Mesh.hxx" +#include #include #include @@ -46,7 +47,7 @@ class SMESHDS_Mesh; class SMESHDS_EXPORT SMESHDS_SubMesh : public SMDS_ElementHolder { public: - SMESHDS_SubMesh(SMESHDS_Mesh *parent, int index); + SMESHDS_SubMesh(const SMESHDS_Mesh *parent, int index); virtual ~SMESHDS_SubMesh(); virtual bool IsComplexSubmesh() const { return !mySubMeshes.empty(); } @@ -62,12 +63,12 @@ class SMESHDS_EXPORT SMESHDS_SubMesh : public SMDS_ElementHolder bool RemoveSubMesh( const SMESHDS_SubMesh* theSubMesh ); void RemoveAllSubmeshes(); bool ContainsSubMesh( const SMESHDS_SubMesh* theSubMesh ) const; - int NbSubMeshes() const { return mySubMeshes.size(); } + size_t NbSubMeshes() const { return mySubMeshes.size(); } SMESHDS_SubMeshIteratorPtr GetSubMeshIterator() const; // for both types - virtual int NbElements() const; - virtual int NbNodes() const; + virtual smIdType NbElements() const; + virtual smIdType NbNodes() const; virtual SMDS_ElemIteratorPtr GetElements() const; virtual SMDS_NodeIteratorPtr GetNodes() const; virtual bool Contains(const SMDS_MeshElement * ME) const; // check if elem or node is in @@ -89,10 +90,10 @@ class SMESHDS_EXPORT SMESHDS_SubMesh : public SMDS_ElementHolder private: int myIndex; - int myNbElements; - int myNbNodes; + smIdType myNbElements; + smIdType myNbNodes; const SMDS_MeshElement* my1stElemNode[2]; // elem and node with least ID, to optimize iteration - SMESHDS_Mesh * myParent; + const SMESHDS_Mesh * myParent; TSubMeshSet mySubMeshes; };