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