X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshElementIDFactory.cxx;h=456d16a15432aa802f3d47d1e3881880aacc2e5d;hp=43f12c7771912daa708edc644b22104f7da9b0de;hb=0febe018bcde111dc7aca1f3e44d4aa2995b59a2;hpb=0de991099a7f8bea2687d44c20021be3066f3615 diff --git a/src/SMDS/SMDS_MeshElementIDFactory.cxx b/src/SMDS/SMDS_MeshElementIDFactory.cxx index 43f12c777..456d16a15 100644 --- a/src/SMDS/SMDS_MeshElementIDFactory.cxx +++ b/src/SMDS/SMDS_MeshElementIDFactory.cxx @@ -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::const_reverse_iterator it = myIDElements.rbegin(); + if ( it != myIDElements.rend() ) + return (*it).first; + + return 0; +} + +//======================================================================= +//function : GetMinID +//purpose : +//======================================================================= + +int SMDS_MeshElementIDFactory::GetMinID() const +{ + map::const_iterator it = myIDElements.begin(); + if ( it != myIDElements.end() ) + return (*it).first; + + return 0; +} +