Salome HOME
Copyrights update
[modules/geom.git] / src / GEOM / GEOM_DataMapOfAsciiStringTransient.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/
19 //
20
21 #ifndef _GEOM_DataMapOfAsciiStringTransient_HeaderFile
22 #define _GEOM_DataMapOfAsciiStringTransient_HeaderFile
23
24 #ifndef _TCollection_BasicMap_HeaderFile
25 #include <TCollection_BasicMap.hxx>
26 #endif
27 #ifndef _Handle_Standard_Transient_HeaderFile
28 #include <Handle_Standard_Transient.hxx>
29 #endif
30 #ifndef _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile
31 #include <Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx>
32 #endif
33 #ifndef _Standard_Integer_HeaderFile
34 #include <Standard_Integer.hxx>
35 #endif
36 #ifndef _Standard_Boolean_HeaderFile
37 #include <Standard_Boolean.hxx>
38 #endif
39 class Standard_DomainError;
40 class Standard_NoSuchObject;
41 class TCollection_AsciiString;
42 class Standard_Transient;
43 class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient;
44 class GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient;
45
46
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
49 #endif
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
52 #endif
53
54 class GEOM_DataMapOfAsciiStringTransient  : public TCollection_BasicMap {
55
56 public:
57
58     void* operator new(size_t,void* anAddress) 
59       {
60         return anAddress;
61       }
62     void* operator new(size_t size) 
63       { 
64         return Standard::Allocate(size); 
65       }
66     void  operator delete(void *anAddress) 
67       { 
68         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
69       }
70  // Methods PUBLIC
71  // 
72 Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const Standard_Integer NbBuckets = 1);
73 Standard_EXPORT   GEOM_DataMapOfAsciiStringTransient& Assign(const GEOM_DataMapOfAsciiStringTransient& Other) ;
74   GEOM_DataMapOfAsciiStringTransient& operator =(const GEOM_DataMapOfAsciiStringTransient& Other) 
75 {
76   return Assign(Other);
77 }
78
79 Standard_EXPORT   void ReSize(const Standard_Integer NbBuckets) ;
80 Standard_EXPORT   void Clear() ;
81 ~GEOM_DataMapOfAsciiStringTransient()
82 {
83   Clear();
84 }
85
86 Standard_EXPORT   Standard_Boolean Bind(const TCollection_AsciiString& K,const Handle(Standard_Transient)& I) ;
87 Standard_EXPORT   Standard_Boolean IsBound(const TCollection_AsciiString& K) const;
88 Standard_EXPORT   Standard_Boolean UnBind(const TCollection_AsciiString& K) ;
89 Standard_EXPORT  const Handle_Standard_Transient& Find(const TCollection_AsciiString& K) const;
90  const Handle_Standard_Transient& operator()(const TCollection_AsciiString& K) const
91 {
92   return Find(K);
93 }
94
95 Standard_EXPORT   Handle_Standard_Transient& ChangeFind(const TCollection_AsciiString& K) ;
96   Handle_Standard_Transient& operator()(const TCollection_AsciiString& K) 
97 {
98   return ChangeFind(K);
99 }
100
101
102
103
104
105
106 protected:
107
108  // Methods PROTECTED
109  // 
110
111
112  // Fields PROTECTED
113  //
114
115
116 private: 
117
118  // Methods PRIVATE
119  // 
120 Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const GEOM_DataMapOfAsciiStringTransient& Other);
121
122
123  // Fields PRIVATE
124  //
125
126
127 };
128
129
130
131
132
133 // other Inline functions and methods (like "C++: function call" methods)
134 //
135
136
137 #endif