Salome HOME
Optimization of GetShapesOn<xxx> functionality
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_PassKey.hxx
1 // File generated by CPPExt (Value)
2 //
3 //                     Copyright (C) 1991 - 2000 by  
4 //                      Matra Datavision SA.  All rights reserved.
5 //  
6 //                     Copyright (C) 2001 - 2004 by
7 //                     Open CASCADE SA.  All rights reserved.
8 // 
9 // This file is part of the Open CASCADE Technology software.
10 //
11 // This software may be distributed and/or modified under the terms and
12 // conditions of the Open CASCADE Public License as defined by Open CASCADE SA
13 // and appearing in the file LICENSE included in the packaging of this file.
14 //  
15 // This software is distributed on an "AS IS" basis, without warranty of any
16 // kind, and Open CASCADE SA hereby disclaims all such warranties,
17 // including without limitation, any warranties of merchantability, fitness
18 // for a particular purpose or non-infringement. Please see the License for
19 // the specific terms and conditions governing rights and limitations under the
20 // License.
21
22 #ifndef _GEOMAlgo_PassKey_HeaderFile
23 #define _GEOMAlgo_PassKey_HeaderFile
24
25 #ifndef _Standard_Integer_HeaderFile
26 #include <Standard_Integer.hxx>
27 #endif
28 #ifndef _Standard_Boolean_HeaderFile
29 #include <Standard_Boolean.hxx>
30 #endif
31 #ifndef _Standard_Address_HeaderFile
32 #include <Standard_Address.hxx>
33 #endif
34 class TColStd_ListOfInteger;
35
36
37 #ifndef _Standard_HeaderFile
38 #include <Standard.hxx>
39 #endif
40 #ifndef _Standard_Macro_HeaderFile
41 #include <Standard_Macro.hxx>
42 #endif
43
44 class GEOMAlgo_PassKey  {
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 Standard_EXPORT GEOMAlgo_PassKey();
63 Standard_EXPORT   GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ;
64   GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other) 
65 {
66   return Assign(Other);
67 }
68
69 Standard_EXPORT   void SetIds(const Standard_Integer aI1) ;
70 Standard_EXPORT   void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ;
71 Standard_EXPORT   void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ;
72 Standard_EXPORT   void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ;
73 Standard_EXPORT   void SetIds(const TColStd_ListOfInteger& aLS) ;
74 Standard_EXPORT   Standard_Integer NbMax() const;
75 Standard_EXPORT   void Clear() ;
76 Standard_EXPORT   void Compute() ;
77 Standard_EXPORT   Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const;
78 Standard_EXPORT   Standard_Address Key() const;
79 Standard_EXPORT   Standard_Integer HashCode(const Standard_Integer Upper) const;
80 Standard_EXPORT   Standard_Integer Id(const Standard_Integer aIndex) const;
81 Standard_EXPORT   void Dump() const;
82
83
84
85
86
87 protected:
88
89  // Methods PROTECTED
90  // 
91
92
93  // Fields PROTECTED
94  //
95 Standard_Integer myNbIds;
96 Standard_Integer myNbMax;
97 Standard_Integer mySum;
98 Standard_Integer myIds[8];
99
100
101 private: 
102
103  // Methods PRIVATE
104  // 
105
106
107  // Fields PRIVATE
108  //
109
110
111 };
112
113
114
115
116
117 // other Inline functions and methods (like "C++: function call" methods)
118 //
119
120
121 #endif