Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_PassKeyShape.hxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef _GEOMAlgo_PassKeyShape_HeaderFile
24 #define _GEOMAlgo_PassKeyShape_HeaderFile
25
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
28 #endif
29 #ifndef _TopTools_IndexedMapOfShape_HeaderFile
30 #include <TopTools_IndexedMapOfShape.hxx>
31 #endif
32 #ifndef _Standard_Boolean_HeaderFile
33 #include <Standard_Boolean.hxx>
34 #endif
35 class TopoDS_Shape;
36 class TopTools_ListOfShape;
37
38
39 #ifndef _Standard_HeaderFile
40 #include <Standard.hxx>
41 #endif
42 #ifndef _Standard_Macro_HeaderFile
43 #include <Standard_Macro.hxx>
44 #endif
45
46
47 class GEOMAlgo_PassKeyShape  {
48
49 public:
50
51     void* operator new(size_t,void* anAddress) 
52       {
53         return anAddress;
54       }
55     void* operator new(size_t size) 
56       { 
57         return Standard::Allocate(size); 
58       }
59     void  operator delete(void *anAddress) 
60       { 
61         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
62       }
63  // Methods PUBLIC
64  // 
65
66
67 Standard_EXPORT GEOMAlgo_PassKeyShape();
68 Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();
69
70
71 Standard_EXPORT GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other);
72
73
74 Standard_EXPORT   GEOMAlgo_PassKeyShape& Assign(const GEOMAlgo_PassKeyShape& Other) ;
75   GEOMAlgo_PassKeyShape& operator =(const GEOMAlgo_PassKeyShape& Other) 
76 {
77   return Assign(Other);
78 }
79
80
81
82 Standard_EXPORT   void SetShapes(const TopoDS_Shape& aS) ;
83
84
85 Standard_EXPORT   void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
86
87
88 Standard_EXPORT   void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
89
90
91 Standard_EXPORT   void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
92
93
94 Standard_EXPORT   void SetShapes(const TopTools_ListOfShape& aLS) ;
95
96
97 Standard_EXPORT   void Clear() ;
98
99
100 Standard_EXPORT   Standard_Integer NbIds() const;
101
102
103 Standard_EXPORT   Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
104
105
106 Standard_EXPORT   Standard_Integer HashCode(const Standard_Integer Upper) const;
107
108
109 Standard_EXPORT   void Dump(const Standard_Integer aHex = 0) const;
110
111
112
113
114
115 protected:
116
117  // Methods PROTECTED
118  // 
119
120
121  // Fields PROTECTED
122  //
123 Standard_Integer myNbIds;
124 Standard_Integer mySum;
125 Standard_Integer myUpper;
126 TopTools_IndexedMapOfShape myMap;
127
128
129 private: 
130
131  // Methods PRIVATE
132  // 
133
134
135  // Fields PRIVATE
136  //
137
138
139 };
140
141
142
143
144
145 // other Inline functions and methods (like "C++: function call" methods)
146 //
147
148
149 #endif