Salome HOME
Remove "MAC" ends of lines
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_DataMapOfShapePnt.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2
3 //
4
5 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6
7 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
8
9 //
10
11 // This library is free software; you can redistribute it and/or
12
13 // modify it under the terms of the GNU Lesser General Public
14
15 // License as published by the Free Software Foundation; either
16
17 // version 2.1 of the License.
18
19 //
20
21 // This library is distributed in the hope that it will be useful,
22
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24
25 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26
27 // Lesser General Public License for more details.
28
29 //
30
31 // You should have received a copy of the GNU Lesser General Public
32
33 // License along with this library; if not, write to the Free Software
34
35 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
36
37 //
38
39 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
40
41
42
43 #ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile
44
45 #define _GEOMAlgo_DataMapOfShapePnt_HeaderFile
46
47
48
49 #ifndef _Standard_HeaderFile
50
51 #include <Standard.hxx>
52
53 #endif
54
55 #ifndef _Standard_Macro_HeaderFile
56
57 #include <Standard_Macro.hxx>
58
59 #endif
60
61
62
63 #ifndef _TCollection_BasicMap_HeaderFile
64
65 #include <TCollection_BasicMap.hxx>
66
67 #endif
68
69 #ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile
70
71 #include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>
72
73 #endif
74
75 #ifndef _Standard_Integer_HeaderFile
76
77 #include <Standard_Integer.hxx>
78
79 #endif
80
81 #ifndef _Standard_Boolean_HeaderFile
82
83 #include <Standard_Boolean.hxx>
84
85 #endif
86
87
88
89 class Standard_DomainError;
90
91 class Standard_NoSuchObject;
92
93 class TopoDS_Shape;
94
95 class gp_Pnt;
96
97 class TopTools_ShapeMapHasher;
98
99 class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;
100
101 class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;
102
103
104
105 #include <Basics_OCCTVersion.hxx>
106
107
108
109 class GEOMAlgo_DataMapOfShapePnt  : public TCollection_BasicMap {
110
111 public:
112
113
114
115   void* operator new(size_t,void* anAddress) 
116
117   {
118
119     return anAddress;
120
121   }
122
123   void* operator new(size_t size) 
124
125   {
126
127     return Standard::Allocate(size); 
128
129   }
130
131   void  operator delete(void *anAddress) 
132
133   {
134
135     if (anAddress) Standard::Free((Standard_Address&)anAddress); 
136
137   }
138
139
140
141   
142
143   Standard_EXPORT   GEOMAlgo_DataMapOfShapePnt(const Standard_Integer NbBuckets = 1);
144
145   
146
147   Standard_EXPORT     GEOMAlgo_DataMapOfShapePnt& Assign(const GEOMAlgo_DataMapOfShapePnt& Other) ;
148
149     GEOMAlgo_DataMapOfShapePnt& operator =(const GEOMAlgo_DataMapOfShapePnt& Other) 
150
151 {
152
153   return Assign(Other);
154
155 }
156
157   
158
159   Standard_EXPORT     void ReSize(const Standard_Integer NbBuckets) ;
160
161   
162
163   Standard_EXPORT     void Clear() ;
164
165 ~GEOMAlgo_DataMapOfShapePnt()
166
167 {
168
169   Clear();
170
171 }
172
173   
174
175   Standard_EXPORT     Standard_Boolean Bind(const TopoDS_Shape& K,const gp_Pnt& I) ;
176
177   
178
179   Standard_EXPORT     Standard_Boolean IsBound(const TopoDS_Shape& K) const;
180
181   
182
183   Standard_EXPORT     Standard_Boolean UnBind(const TopoDS_Shape& K) ;
184
185   
186
187   Standard_EXPORT    const gp_Pnt& Find(const TopoDS_Shape& K) const;
188
189    const gp_Pnt& operator()(const TopoDS_Shape& K) const
190
191 {
192
193   return Find(K);
194
195 }
196
197   
198
199   Standard_EXPORT     gp_Pnt& ChangeFind(const TopoDS_Shape& K) ;
200
201     gp_Pnt& operator()(const TopoDS_Shape& K) 
202
203 {
204
205   return ChangeFind(K);
206
207 }
208
209
210
211 #if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
212
213   Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
214
215   Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
216
217 #endif
218
219
220
221 private:
222
223   
224
225   Standard_EXPORT   GEOMAlgo_DataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& Other);
226
227
228
229 };
230
231
232
233 // other Inline functions and methods (like "C++: function call" methods)
234
235
236
237 #endif
238