Salome HOME
Initialisation de la base KERNEL avec la version operationnelle de KERNEL_SRC issue...
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_DataMapStringLabel.hxx
1 //  File      : SALOMEDS_DataMapStringLabel.hxx
2 //  Created   : Tue Aug 13 14:05:03 2002
3 //  Author    : Yves FRICAUD
4
5 //  Project   : SALOME
6 //  Module    : SALOMEDS
7 //  Copyright : Open CASCADE 2002
8 //  $Header: 
9
10 #ifndef _SALOMEDS_DataMapStringLabel_HeaderFile
11 #define _SALOMEDS_DataMapStringLabel_HeaderFile
12
13 #ifndef _TCollection_BasicMap_HeaderFile
14 #include <TCollection_BasicMap.hxx>
15 #endif
16 #ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
17 #include <Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx>
18 #endif
19 #ifndef _Standard_Integer_HeaderFile
20 #include <Standard_Integer.hxx>
21 #endif
22 #ifndef _Standard_Boolean_HeaderFile
23 #include <Standard_Boolean.hxx>
24 #endif
25 class Standard_DomainError;
26 class Standard_NoSuchObject;
27 class TCollection_ExtendedString;
28 class TDF_Label;
29 class SALOMEDS_DataMapNodeOfDataMapStringLabel;
30 class SALOMEDS_DataMapIteratorOfDataMapStringLabel;
31
32
33 #ifndef _Standard_HeaderFile
34 #include <Standard.hxx>
35 #endif
36 #ifndef _Standard_Macro_HeaderFile
37 #include <Standard_Macro.hxx>
38 #endif
39
40 class SALOMEDS_DataMapStringLabel  : public TCollection_BasicMap {
41
42 public:
43
44     inline void* operator new(size_t,void* anAddress) 
45       {
46         return anAddress;
47       }
48     inline void* operator new(size_t size) 
49       { 
50         return Standard::Allocate(size); 
51       }
52     inline void  operator delete(void *anAddress) 
53       { 
54         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
55       }
56 //    inline void  operator delete(void *anAddress, size_t size) 
57 //      { 
58 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
59 //      }
60  // Methods PUBLIC
61  // 
62 Standard_EXPORT SALOMEDS_DataMapStringLabel(const Standard_Integer NbBuckets = 1);
63 Standard_EXPORT   SALOMEDS_DataMapStringLabel& Assign(const SALOMEDS_DataMapStringLabel& Other) ;
64   SALOMEDS_DataMapStringLabel& operator =(const SALOMEDS_DataMapStringLabel& Other) 
65 {
66   return Assign(Other);
67 }
68
69 Standard_EXPORT   void ReSize(const Standard_Integer NbBuckets) ;
70 Standard_EXPORT   void Clear() ;
71 ~SALOMEDS_DataMapStringLabel()
72 {
73   Clear();
74 }
75
76 Standard_EXPORT   Standard_Boolean Bind(const TCollection_ExtendedString& K,const TDF_Label& I) ;
77 Standard_EXPORT   Standard_Boolean IsBound(const TCollection_ExtendedString& K) const;
78 Standard_EXPORT   Standard_Boolean UnBind(const TCollection_ExtendedString& K) ;
79 Standard_EXPORT  const TDF_Label& Find(const TCollection_ExtendedString& K) const;
80  const TDF_Label& operator()(const TCollection_ExtendedString& K) const
81 {
82   return Find(K);
83 }
84
85 Standard_EXPORT   TDF_Label& ChangeFind(const TCollection_ExtendedString& K) ;
86   TDF_Label& operator()(const TCollection_ExtendedString& K) 
87 {
88   return ChangeFind(K);
89 }
90
91
92
93
94
95
96 protected:
97
98  // Methods PROTECTED
99  // 
100
101
102  // Fields PROTECTED
103  //
104
105
106 private: 
107
108  // Methods PRIVATE
109  // 
110 Standard_EXPORT SALOMEDS_DataMapStringLabel(const SALOMEDS_DataMapStringLabel& Other);
111
112
113  // Fields PRIVATE
114  //
115
116
117 };
118
119
120
121
122
123 // other inline functions and methods (like "C++: function call" methods)
124 //
125
126
127 #endif