Salome HOME
NRI : First integration.
[modules/smesh.git] / src / SMDS / SMDS_MeshIDFactory.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_MeshIDFactory_HeaderFile
17 #define _SMDS_MeshIDFactory_HeaderFile
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Handle_SMDS_MeshIDFactory_HeaderFile
23 #include "Handle_SMDS_MeshIDFactory.hxx"
24 #endif
25
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
28 #endif
29 #ifndef _TColStd_StackOfInteger_HeaderFile
30 #include <TColStd_StackOfInteger.hxx>
31 #endif
32 #ifndef _SMDS_MeshObject_HeaderFile
33 #include "SMDS_MeshObject.hxx"
34 #endif
35
36
37 class SMDS_MeshIDFactory : public SMDS_MeshObject {
38
39 public:
40
41     inline void* operator new(size_t,void* anAddress) 
42       {
43         return anAddress;
44       }
45     inline void* operator new(size_t size) 
46       { 
47         return Standard::Allocate(size); 
48       }
49     inline void  operator delete(void *anAddress) 
50       { 
51         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
52       }
53 //    inline void  operator delete(void *anAddress, size_t size) 
54 //      { 
55 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
56 //      }
57  // Methods PUBLIC
58  // 
59 Standard_EXPORT virtual  Standard_Integer GetFreeID()  = 0;
60 Standard_EXPORT virtual  void ReleaseID(const Standard_Integer ID)  = 0;
61 Standard_EXPORT ~SMDS_MeshIDFactory();
62
63
64
65
66  // Type management
67  //
68  Standard_EXPORT friend Handle_Standard_Type& SMDS_MeshIDFactory_Type_();
69  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
70  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
71
72 protected:
73
74  // Methods PROTECTED
75  // 
76 Standard_EXPORT SMDS_MeshIDFactory();
77
78
79  // Fields PROTECTED
80  //
81 Standard_Integer myMaxID;
82 TColStd_StackOfInteger myPoolOfID;
83
84
85 private: 
86
87  // Methods PRIVATE
88  // 
89
90
91  // Fields PRIVATE
92  //
93
94
95 };
96
97
98
99
100
101 // other inline functions and methods (like "C++: function call" methods)
102 //
103
104
105 #endif