Back to index

salome-geom  6.5.0
NMTDS_PassKey.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 // File:        NMTDS_PassKey.hxx
00024 // Created:     
00025 // Author:      Peter KURNEV
00026 //              <peter@PREFEX>
00027 //
00028 #ifndef _NMTDS_PassKey_HeaderFile
00029 #define _NMTDS_PassKey_HeaderFile
00030 
00031 #include <Standard.hxx>
00032 #include <Standard_Macro.hxx>
00033 #include <Standard_Integer.hxx>
00034 #include <TColStd_IndexedMapOfInteger.hxx>
00035 #include <Standard_Boolean.hxx>
00036 #include <TColStd_ListOfInteger.hxx>
00037 
00038 //=======================================================================
00039 //function : NMTDS_PassKey
00040 //purpose  : 
00041 //=======================================================================
00042 class NMTDS_PassKey  {
00043  public:
00044   Standard_EXPORT   
00045     NMTDS_PassKey();
00046   
00047   Standard_EXPORT
00048     virtual ~NMTDS_PassKey();
00049   
00050   Standard_EXPORT
00051     NMTDS_PassKey(const NMTDS_PassKey& Other);
00052 
00053   Standard_EXPORT 
00054     NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);
00055   
00056   Standard_EXPORT
00057     void Clear() ;
00058   
00059   Standard_EXPORT
00060     void SetIds(const Standard_Integer aI1) ;
00061   
00062   Standard_EXPORT
00063     void SetIds(const Standard_Integer aI1,
00064               const Standard_Integer aI2) ;
00065   
00066   Standard_EXPORT
00067     void SetIds(const Standard_Integer aI1,
00068               const Standard_Integer aI2,
00069               const Standard_Integer aI3) ;
00070   
00071   Standard_EXPORT
00072     void SetIds(const Standard_Integer aI1,
00073               const Standard_Integer aI2,
00074               const Standard_Integer aI3,
00075               const Standard_Integer aI4) ;
00076   
00077   Standard_EXPORT
00078     void SetIds(const TColStd_ListOfInteger& aLS) ;
00079   
00080   Standard_EXPORT
00081     Standard_Integer NbIds() const;
00082   
00083   Standard_EXPORT
00084     Standard_Boolean IsEqual(const NMTDS_PassKey& aOther) const;
00085   
00086   Standard_EXPORT
00087     Standard_Integer HashCode(const Standard_Integer Upper) const;
00088   
00089   Standard_EXPORT
00090     Standard_Integer Id(const Standard_Integer aIndex) const;
00091   
00092   Standard_EXPORT
00093     void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const;
00094   
00095   Standard_EXPORT
00096     void Dump(const Standard_Integer aHex = 0) const;
00097 
00098 protected:
00099   Standard_Integer myNbIds;
00100   Standard_Integer mySum;
00101   TColStd_IndexedMapOfInteger myMap;
00102 };
00103 #endif