Salome HOME
New DS implementation
[modules/smesh.git] / src / SMDS / SMDS_MeshElementIDFactory.cdl
1 --  SMESH SMDS : implementaion of Salome mesh data structure
2 --
3 --  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 -- 
6 --  This library is free software; you can redistribute it and/or 
7 --  modify it under the terms of the GNU Lesser General Public 
8 --  License as published by the Free Software Foundation; either 
9 --  version 2.1 of the License. 
10 -- 
11 --  This library is distributed in the hope that it will be useful, 
12 --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 --  Lesser General Public License for more details. 
15 -- 
16 --  You should have received a copy of the GNU Lesser General Public 
17 --  License along with this library; if not, write to the Free Software 
18 --  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 -- 
20 --  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 --
22 --
23 --
24 --  File   : SMDS_MeshElementIDFactory.cdl
25 --  Author : Jean-Michel BOULCOURT
26 --  Module : SMESH
27
28 private class MeshElementIDFactory from SMDS inherits MeshIDFactory
29
30         ---Purpose: 
31
32 uses
33     DataMapOfIntegerMeshElement from SMDS,
34     MeshElement from SMDS
35
36 is
37
38     Create returns mutable MeshElementIDFactory from SMDS;
39
40     GetFreeID(me:mutable) returns Integer is redefined static;
41         ---Purpose: returns a free identifier for mesh from
42         --          the pool of ID
43         ---C++: inline
44         
45     ReleaseID(me: mutable;ID :Integer) is redefined static;
46         ---Purpose: free the ID and give it back to the pool of ID
47         ---C++: inline
48
49     BindID(me: mutable;ID :Integer; elem : MeshElement from SMDS )
50     returns Boolean;
51         ---Purpose: bind the ID with the mesh element
52         --          returns False if the ID is already bound.
53         --          In this case the element is not replaced
54         ---C++: inline
55
56     MeshElement(me;ID :Integer) returns MeshElement from SMDS;
57         ---Purpose: returns the MeshElement associated with ID
58         --          raises an exception if the ID is not bound
59         ---C++: inline
60
61
62 fields
63     myIDElements : DataMapOfIntegerMeshElement from SMDS;
64     
65 end MeshElementIDFactory;