Salome HOME
Integration of PAL/SALOME V2.1.0c from OCC
[modules/smesh.git] / src / SMDS / SMDS_MeshElementIDFactory.cxx
index 43f12c7771912daa708edc644b22104f7da9b0de..456d16a15432aa802f3d47d1e3881880aacc2e5d 100644 (file)
@@ -29,6 +29,8 @@
 #include "SMDS_MeshElementIDFactory.hxx"
 #include "SMDS_MeshElement.hxx"
 
+using namespace std;
+
 //=======================================================================
 //function : SMDS_MeshElementIDFactory
 //purpose  : 
@@ -82,3 +84,32 @@ void SMDS_MeshElementIDFactory::ReleaseID(const int ID)
   myIDElements.erase(ID);
   SMDS_MeshIDFactory::ReleaseID(ID);
 }
+
+//=======================================================================
+//function : GetMaxID
+//purpose  : 
+//=======================================================================
+
+int SMDS_MeshElementIDFactory::GetMaxID() const
+{
+  map<int, SMDS_MeshElement*>::const_reverse_iterator it = myIDElements.rbegin();
+  if ( it !=  myIDElements.rend() )
+    return (*it).first;
+
+  return 0;
+}
+
+//=======================================================================
+//function : GetMinID
+//purpose  : 
+//=======================================================================
+
+int SMDS_MeshElementIDFactory::GetMinID() const
+{
+  map<int, SMDS_MeshElement*>::const_iterator it = myIDElements.begin();
+  if ( it !=  myIDElements.end() )
+    return (*it).first;
+
+  return 0;
+}
+