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