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 _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile 00021 #define _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile 00022 00023 #ifndef _TCollection_BasicMap_HeaderFile 00024 #include <TCollection_BasicMap.hxx> 00025 #endif 00026 #ifndef _Standard_Integer_HeaderFile 00027 #include <Standard_Integer.hxx> 00028 #endif 00029 #ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile 00030 #include <Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.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 TColStd_MapOfInteger; 00038 class TColStd_MapIntegerHasher; 00039 class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger; 00040 class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger; 00041 00042 00043 #ifndef _Standard_HeaderFile 00044 #include <Standard.hxx> 00045 #endif 00046 #ifndef _Standard_Macro_HeaderFile 00047 #include <Standard_Macro.hxx> 00048 #endif 00049 00050 00051 class NMTDS_DataMapOfIntegerMapOfInteger : public TCollection_BasicMap { 00052 00053 public: 00054 00055 void* operator new(size_t,void* anAddress) 00056 { 00057 return anAddress; 00058 } 00059 void* operator new(size_t size) 00060 { 00061 return Standard::Allocate(size); 00062 } 00063 void operator delete(void *anAddress) 00064 { 00065 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00066 } 00067 // Methods PUBLIC 00068 // 00069 00070 00071 Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const Standard_Integer NbBuckets = 1); 00072 00073 00074 Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger& Assign(const NMTDS_DataMapOfIntegerMapOfInteger& Other) ; 00075 NMTDS_DataMapOfIntegerMapOfInteger& operator =(const NMTDS_DataMapOfIntegerMapOfInteger& Other) 00076 { 00077 return Assign(Other); 00078 } 00079 00080 00081 00082 Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; 00083 00084 00085 Standard_EXPORT void Clear() ; 00086 ~NMTDS_DataMapOfIntegerMapOfInteger() 00087 { 00088 Clear(); 00089 } 00090 00091 00092 00093 Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const TColStd_MapOfInteger& I) ; 00094 00095 00096 Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const; 00097 00098 00099 Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ; 00100 00101 00102 Standard_EXPORT const TColStd_MapOfInteger& Find(const Standard_Integer& K) const; 00103 const TColStd_MapOfInteger& operator()(const Standard_Integer& K) const 00104 { 00105 return Find(K); 00106 } 00107 00108 00109 00110 Standard_EXPORT TColStd_MapOfInteger& ChangeFind(const Standard_Integer& K) ; 00111 TColStd_MapOfInteger& operator()(const Standard_Integer& K) 00112 { 00113 return ChangeFind(K); 00114 } 00115 00116 00117 00118 00119 00120 00121 protected: 00122 00123 // Methods PROTECTED 00124 // 00125 00126 00127 // Fields PROTECTED 00128 // 00129 00130 00131 private: 00132 00133 // Methods PRIVATE 00134 // 00135 00136 00137 Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& Other); 00138 00139 00140 // Fields PRIVATE 00141 // 00142 00143 00144 }; 00145 00146 00147 00148 00149 00150 // other Inline functions and methods (like "C++: function call" methods) 00151 // 00152 00153 00154 #endif