Back to index

salome-gui  6.5.0
SALOME_DataMapOfIOMapOfInteger.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00046 class Standard_DomainError;
00047 class Standard_NoSuchObject;
00048 class SALOME_InteractiveObject;
00049 class TColStd_IndexedMapOfInteger;
00050 class TColStd_MapTransientHasher;
00051 class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger;
00052 class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger;
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 #include <Basics_OCCTVersion.hxx>
00062 
00063 class SALOME_DataMapOfIOMapOfInteger  : public TCollection_BasicMap {
00064 
00065 public:
00066 
00067     inline void* operator new(size_t,void* anAddress) 
00068       {
00069         return anAddress;
00070       }
00071     inline void* operator new(size_t size) 
00072       { 
00073         return Standard::Allocate(size); 
00074       }
00075     inline void  operator delete(void *anAddress) 
00076       { 
00077         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00078       }
00079 
00080  // Methods PUBLIC
00081  // 
00082 Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const Standard_Integer NbBuckets = 1);
00083 Standard_EXPORT   SALOME_DataMapOfIOMapOfInteger& Assign(const SALOME_DataMapOfIOMapOfInteger& Other) ;
00084   SALOME_DataMapOfIOMapOfInteger& operator =(const SALOME_DataMapOfIOMapOfInteger& Other) 
00085 {
00086   return Assign(Other);
00087 }
00088 
00089 Standard_EXPORT   void ReSize(const Standard_Integer NbBuckets) ;
00090 Standard_EXPORT   void Clear() ;
00091 ~SALOME_DataMapOfIOMapOfInteger()
00092 {
00093   Clear();
00094 }
00095 
00096 Standard_EXPORT   Standard_Boolean Bind(const Handle(SALOME_InteractiveObject)& K,const TColStd_IndexedMapOfInteger& I) ;
00097 Standard_EXPORT   Standard_Boolean IsBound(const Handle(SALOME_InteractiveObject)& K) const;
00098 Standard_EXPORT   Standard_Boolean UnBind(const Handle(SALOME_InteractiveObject)& K) ;
00099 Standard_EXPORT  const TColStd_IndexedMapOfInteger& Find(const Handle(SALOME_InteractiveObject)& K) const;
00100  const TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) const
00101 {
00102   return Find(K);
00103 }
00104 
00105 Standard_EXPORT   TColStd_IndexedMapOfInteger& ChangeFind(const Handle(SALOME_InteractiveObject)& K) ;
00106   TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) 
00107 {
00108   return ChangeFind(K);
00109 }
00110 
00111 #if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
00112 Standard_EXPORT   Standard_Address Find1 (const Handle(SALOME_InteractiveObject)& K) const;
00113 Standard_EXPORT   Standard_Address ChangeFind1 (const Handle(SALOME_InteractiveObject)& K);
00114 #endif
00115 
00116 private: 
00117 Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& Other);
00118 };
00119 
00120 // other inline functions and methods (like "C++: function call" methods)
00121 //
00122 
00123 #endif