00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 #ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile 00021 #define _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile 00022 00023 #ifndef _TCollection_BasicMap_HeaderFile 00024 #include <TCollection_BasicMap.hxx> 00025 #endif 00026 #ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile 00027 #include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx> 00028 #endif 00029 #ifndef _Standard_Integer_HeaderFile 00030 #include <Standard_Integer.hxx> 00031 #endif 00032 #ifndef _Standard_Boolean_HeaderFile 00033 #include <Standard_Boolean.hxx> 00034 #endif 00035 class Standard_DomainError; 00036 class Standard_NoSuchObject; 00037 class GEOMAlgo_PassKeyShape; 00038 class TopoDS_Shape; 00039 class GEOMAlgo_PassKeyShapeMapHasher; 00040 class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape; 00041 class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape; 00042 00043 00044 #ifndef _Standard_HeaderFile 00045 #include <Standard.hxx> 00046 #endif 00047 #ifndef _Standard_Macro_HeaderFile 00048 #include <Standard_Macro.hxx> 00049 #endif 00050 00051 00052 class GEOMAlgo_DataMapOfPassKeyShapeShape : public TCollection_BasicMap { 00053 00054 public: 00055 00056 void* operator new(size_t,void* anAddress) 00057 { 00058 return anAddress; 00059 } 00060 void* operator new(size_t size) 00061 { 00062 return Standard::Allocate(size); 00063 } 00064 void operator delete(void *anAddress) 00065 { 00066 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00067 } 00068 // Methods PUBLIC 00069 // 00070 00071 00072 Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const Standard_Integer NbBuckets = 1); 00073 00074 00075 Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape& Assign(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) ; 00076 GEOMAlgo_DataMapOfPassKeyShapeShape& operator =(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) 00077 { 00078 return Assign(Other); 00079 } 00080 00081 00082 00083 Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; 00084 00085 00086 Standard_EXPORT void Clear() ; 00087 ~GEOMAlgo_DataMapOfPassKeyShapeShape() 00088 { 00089 Clear(); 00090 } 00091 00092 00093 00094 Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKeyShape& K,const TopoDS_Shape& I) ; 00095 00096 00097 Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKeyShape& K) const; 00098 00099 00100 Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKeyShape& K) ; 00101 00102 00103 Standard_EXPORT const TopoDS_Shape& Find(const GEOMAlgo_PassKeyShape& K) const; 00104 const TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) const 00105 { 00106 return Find(K); 00107 } 00108 00109 00110 00111 Standard_EXPORT TopoDS_Shape& ChangeFind(const GEOMAlgo_PassKeyShape& K) ; 00112 TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) 00113 { 00114 return ChangeFind(K); 00115 } 00116 00117 00118 00119 00120 00121 00122 protected: 00123 00124 // Methods PROTECTED 00125 // 00126 00127 00128 // Fields PROTECTED 00129 // 00130 00131 00132 private: 00133 00134 // Methods PRIVATE 00135 // 00136 00137 00138 Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other); 00139 00140 00141 // Fields PRIVATE 00142 // 00143 00144 00145 }; 00146 00147 00148 00149 00150 00151 // other Inline functions and methods (like "C++: function call" methods) 00152 // 00153 00154 00155 #endif