Salome HOME
NRI : First integration.
[modules/smesh.git] / src / SMDS / SMDS_MeshElementIDFactory.hxx
1 // File generated by CPPExt (Transient)
2 //
3 //                     Copyright (C) 1991,1995 by
4 //  
5 //                      MATRA DATAVISION, FRANCE
6 //  
7 // This software is furnished in accordance with the terms and conditions
8 // of the contract and with the inclusion of the above copyright notice.
9 // This software or any other copy thereof may not be provided or otherwise
10 // be made available to any other person. No title to an ownership of the
11 // software is hereby transferred.
12 //  
13 // At the termination of the contract, the software and all copies of this
14 // software must be deleted.
15 //
16 #ifndef _SMDS_MeshElementIDFactory_HeaderFile
17 #define _SMDS_MeshElementIDFactory_HeaderFile
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Handle_SMDS_MeshElementIDFactory_HeaderFile
23 #include "Handle_SMDS_MeshElementIDFactory.hxx"
24 #endif
25
26 #ifndef _SMDS_DataMapOfIntegerMeshElement_HeaderFile
27 #include "SMDS_DataMapOfIntegerMeshElement.hxx"
28 #endif
29 #ifndef _SMDS_MeshIDFactory_HeaderFile
30 #include "SMDS_MeshIDFactory.hxx"
31 #endif
32 #ifndef _Standard_Integer_HeaderFile
33 #include <Standard_Integer.hxx>
34 #endif
35 #ifndef _Standard_Boolean_HeaderFile
36 #include <Standard_Boolean.hxx>
37 #endif
38 #ifndef _Handle_SMDS_MeshElement_HeaderFile
39 #include "Handle_SMDS_MeshElement.hxx"
40 #endif
41 class SMDS_MeshElement;
42
43
44 class SMDS_MeshElementIDFactory : public SMDS_MeshIDFactory {
45
46 public:
47
48     inline void* operator new(size_t,void* anAddress) 
49       {
50         return anAddress;
51       }
52     inline void* operator new(size_t size) 
53       { 
54         return Standard::Allocate(size); 
55       }
56     inline void  operator delete(void *anAddress) 
57       { 
58         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
59       }
60 //    inline void  operator delete(void *anAddress, size_t size) 
61 //      { 
62 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
63 //      }
64  // Methods PUBLIC
65  // 
66 Standard_EXPORT SMDS_MeshElementIDFactory();
67 Standard_EXPORT inline   Standard_Integer GetFreeID() ;
68 Standard_EXPORT inline   void ReleaseID(const Standard_Integer ID) ;
69 Standard_EXPORT inline   Standard_Boolean BindID(const Standard_Integer ID,const Handle(SMDS_MeshElement)& elem) ;
70 Standard_EXPORT inline   Handle_SMDS_MeshElement MeshElement(const Standard_Integer ID) const;
71 Standard_EXPORT ~SMDS_MeshElementIDFactory();
72
73
74
75
76  // Type management
77  //
78  Standard_EXPORT friend Handle_Standard_Type& SMDS_MeshElementIDFactory_Type_();
79  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
80  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
81
82 protected:
83
84  // Methods PROTECTED
85  // 
86
87
88  // Fields PROTECTED
89  //
90
91
92 private: 
93
94  // Methods PRIVATE
95  // 
96
97
98  // Fields PRIVATE
99  //
100 SMDS_DataMapOfIntegerMeshElement myIDElements;
101
102
103 };
104
105
106 #include "SMDS_MeshElementIDFactory.lxx"
107
108
109
110 // other inline functions and methods (like "C++: function call" methods)
111 //
112
113
114 #endif