Salome HOME
CMake porting.
[modules/geom.git] / src / NMTDS / NMTDS_PassKeyShape.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // File:        NMTDS_PassKeyShape.hxx
21 // Created:     
22 // Author:      Peter KURNEV
23 //              <pkv@irinox>
24 //
25 #ifndef _NMTDS_PassKeyShape_HeaderFile
26 #define _NMTDS_PassKeyShape_HeaderFile
27
28 #include <Standard.hxx>
29 #include <Standard_Macro.hxx>
30 #include <Standard_Integer.hxx>
31 #include <TopTools_IndexedMapOfShape.hxx>
32 #include <Standard_Boolean.hxx>
33 #include <TopoDS_Shape.hxx>
34 #include <TopTools_ListOfShape.hxx>
35
36 //=======================================================================
37 //function : NMTDS_PassKeyShape
38 //purpose  : 
39 //=======================================================================
40 class NMTDS_PassKeyShape  {
41  public:
42   Standard_EXPORT
43     NMTDS_PassKeyShape();
44   
45   Standard_EXPORT 
46     virtual ~NMTDS_PassKeyShape();
47   
48   Standard_EXPORT 
49     NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other);
50   
51   Standard_EXPORT
52     NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ;
53     
54   NMTDS_PassKeyShape& operator =(const NMTDS_PassKeyShape& Other) {
55     return Assign(Other);
56   }
57   
58   Standard_EXPORT     
59     void SetShapes(const TopoDS_Shape& aS) ;
60   
61   Standard_EXPORT
62     void SetShapes(const TopoDS_Shape& aS1,
63                    const TopoDS_Shape& aS2) ;
64   
65   Standard_EXPORT
66     void SetShapes(const TopoDS_Shape& aS1,
67                    const TopoDS_Shape& aS2,
68                    const TopoDS_Shape& aS3) ;
69   
70   Standard_EXPORT
71     void SetShapes(const TopoDS_Shape& aS1,
72                    const TopoDS_Shape& aS2,
73                    const TopoDS_Shape& aS3,
74                    const TopoDS_Shape& aS4) ;
75   
76   Standard_EXPORT
77     void SetShapes(const TopTools_ListOfShape& aLS) ;
78   
79   Standard_EXPORT
80     void Clear() ;
81   
82   Standard_EXPORT
83     Standard_Integer NbIds() const;
84   
85   Standard_EXPORT
86     Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aOther) const;
87   
88   Standard_EXPORT
89     Standard_Integer HashCode(const Standard_Integer Upper) const;
90   
91   Standard_EXPORT
92     void Dump(const Standard_Integer aHex = 0) const;
93
94  protected:
95   Standard_Integer myNbIds;
96   Standard_Integer mySum;
97   Standard_Integer myUpper;
98   TopTools_IndexedMapOfShape myMap;
99 };
100 #endif