+int SMDS_MeshIDFactory::GetFreeID()
+{
+ if (myPoolOfID.empty()) return ++myMaxID;
+ else
+ {
+ int ID = myPoolOfID.top();
+ myPoolOfID.pop();
+ return ID;
+ }
+}
+
+//=======================================================================
+//function : ReleaseID
+//purpose :
+//=======================================================================
+void SMDS_MeshIDFactory::ReleaseID(const int ID)
+{
+ if (ID < myMaxID) myPoolOfID.push(ID);
+}