1 // File: SMDS_MeshElementIDFactory.lxx
2 // Created: Tue May 7 16:30:34 2002
3 // Author: Jean-Michel BOULCOURT
4 // <jmb@localhost.localdomain>
6 //=======================================================================
9 //=======================================================================
10 inline Standard_Integer SMDS_MeshElementIDFactory::GetFreeID()
12 if (myPoolOfID.IsEmpty()) {
14 while (myIDElements.IsBound(myMaxID)) ++myMaxID;
17 Standard_Integer ID = myPoolOfID.Top();
24 //=======================================================================
25 //function : ReleaseID
27 //=======================================================================
28 inline void SMDS_MeshElementIDFactory::ReleaseID(const Standard_Integer ID)
30 myIDElements.UnBind(ID);
36 //=======================================================================
39 //=======================================================================
40 inline Standard_Boolean SMDS_MeshElementIDFactory::BindID(const Standard_Integer ID,
41 const Handle(SMDS_MeshElement)& elem)
43 return myIDElements.Bind(ID,elem);
47 //=======================================================================
48 //function : MeshElement
50 //=======================================================================
51 inline Handle(SMDS_MeshElement) SMDS_MeshElementIDFactory::MeshElement(const Standard_Integer ID) const
53 return myIDElements.Find(ID);