1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
5 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
7 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
11 // This library is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU Lesser General Public
15 // License as published by the Free Software Foundation; either
17 // version 2.1 of the License.
21 // This library is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
25 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 // Lesser General Public License for more details.
31 // You should have received a copy of the GNU Lesser General Public
33 // License along with this library; if not, write to the Free Software
35 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
43 #ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile
45 #define _GEOMAlgo_DataMapOfShapePnt_HeaderFile
49 #ifndef _Standard_HeaderFile
51 #include <Standard.hxx>
55 #ifndef _Standard_Macro_HeaderFile
57 #include <Standard_Macro.hxx>
63 #ifndef _TCollection_BasicMap_HeaderFile
65 #include <TCollection_BasicMap.hxx>
69 #ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile
71 #include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>
75 #ifndef _Standard_Integer_HeaderFile
77 #include <Standard_Integer.hxx>
81 #ifndef _Standard_Boolean_HeaderFile
83 #include <Standard_Boolean.hxx>
89 class Standard_DomainError;
91 class Standard_NoSuchObject;
97 class TopTools_ShapeMapHasher;
99 class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;
101 class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;
105 #include <Basics_OCCTVersion.hxx>
109 class GEOMAlgo_DataMapOfShapePnt : public TCollection_BasicMap {
115 void* operator new(size_t,void* anAddress)
123 void* operator new(size_t size)
127 return Standard::Allocate(size);
131 void operator delete(void *anAddress)
135 if (anAddress) Standard::Free((Standard_Address&)anAddress);
143 Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const Standard_Integer NbBuckets = 1);
147 Standard_EXPORT GEOMAlgo_DataMapOfShapePnt& Assign(const GEOMAlgo_DataMapOfShapePnt& Other) ;
149 GEOMAlgo_DataMapOfShapePnt& operator =(const GEOMAlgo_DataMapOfShapePnt& Other)
153 return Assign(Other);
159 Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
163 Standard_EXPORT void Clear() ;
165 ~GEOMAlgo_DataMapOfShapePnt()
175 Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const gp_Pnt& I) ;
179 Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
183 Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
187 Standard_EXPORT const gp_Pnt& Find(const TopoDS_Shape& K) const;
189 const gp_Pnt& operator()(const TopoDS_Shape& K) const
199 Standard_EXPORT gp_Pnt& ChangeFind(const TopoDS_Shape& K) ;
201 gp_Pnt& operator()(const TopoDS_Shape& K)
205 return ChangeFind(K);
211 #if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
213 Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
215 Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
225 Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& Other);
233 // other Inline functions and methods (like "C++: function call" methods)