Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / src / NMTDS / NMTDS_InterfPool.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_InterfPool_HeaderFile
21 #define _NMTDS_InterfPool_HeaderFile
22
23 #ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile
24 #include <NMTDS_MapOfPassKeyBoolean.hxx>
25 #endif
26 #ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile
27 #include <NMTDS_ListOfPassKeyBoolean.hxx>
28 #endif
29 #ifndef _Standard_Integer_HeaderFile
30 #include <Standard_Integer.hxx>
31 #endif
32 #ifndef _BOPTools_CArray1OfSSInterference_HeaderFile
33 #include <BOPTools_CArray1OfSSInterference.hxx>
34 #endif
35 #ifndef _BOPTools_CArray1OfESInterference_HeaderFile
36 #include <BOPTools_CArray1OfESInterference.hxx>
37 #endif
38 #ifndef _BOPTools_CArray1OfVSInterference_HeaderFile
39 #include <BOPTools_CArray1OfVSInterference.hxx>
40 #endif
41 #ifndef _BOPTools_CArray1OfEEInterference_HeaderFile
42 #include <BOPTools_CArray1OfEEInterference.hxx>
43 #endif
44 #ifndef _BOPTools_CArray1OfVEInterference_HeaderFile
45 #include <BOPTools_CArray1OfVEInterference.hxx>
46 #endif
47 #ifndef _BOPTools_CArray1OfVVInterference_HeaderFile
48 #include <BOPTools_CArray1OfVVInterference.hxx>
49 #endif
50 #ifndef _Standard_Boolean_HeaderFile
51 #include <Standard_Boolean.hxx>
52 #endif
53 #ifndef _NMTDS_InterfType_HeaderFile
54 #include <NMTDS_InterfType.hxx>
55 #endif
56 class NMTDS_PassKeyBoolean;
57 class NMTDS_ListOfPassKeyBoolean;
58 class BOPTools_CArray1OfSSInterference;
59 class BOPTools_CArray1OfESInterference;
60 class BOPTools_CArray1OfVSInterference;
61 class BOPTools_CArray1OfEEInterference;
62 class BOPTools_CArray1OfVEInterference;
63 class BOPTools_CArray1OfVVInterference;
64
65
66 #ifndef _Standard_HeaderFile
67 #include <Standard.hxx>
68 #endif
69 #ifndef _Standard_Macro_HeaderFile
70 #include <Standard_Macro.hxx>
71 #endif
72
73
74 class NMTDS_InterfPool  {
75
76 public:
77
78     void* operator new(size_t,void* anAddress) 
79       {
80         return anAddress;
81       }
82     void* operator new(size_t size) 
83       { 
84         return Standard::Allocate(size); 
85       }
86     void  operator delete(void *anAddress) 
87       { 
88         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
89       }
90  // Methods PUBLIC
91  // 
92
93
94 Standard_EXPORT NMTDS_InterfPool();
95 Standard_EXPORT virtual ~NMTDS_InterfPool();
96
97
98 Standard_EXPORT   Standard_Boolean Add(const NMTDS_PassKeyBoolean& aPKB,const NMTDS_InterfType aType) ;
99
100
101 Standard_EXPORT   Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const NMTDS_InterfType aType) ;
102
103
104 Standard_EXPORT   Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const Standard_Boolean bFlag,const NMTDS_InterfType aType) ;
105
106
107 Standard_EXPORT   Standard_Boolean Contains(const NMTDS_PassKeyBoolean& aPKB) const;
108
109
110 Standard_EXPORT   Standard_Boolean Contains(const Standard_Integer aInd1,const Standard_Integer aInd2) const;
111
112
113 Standard_EXPORT  const NMTDS_ListOfPassKeyBoolean& Get() const;
114
115
116 Standard_EXPORT  const NMTDS_ListOfPassKeyBoolean& Get(const NMTDS_InterfType aType) const;
117
118
119 Standard_EXPORT  const NMTDS_ListOfPassKeyBoolean& Get(const Standard_Integer aInd) const;
120
121
122 Standard_EXPORT  const NMTDS_ListOfPassKeyBoolean& Get(const Standard_Integer aInd,const NMTDS_InterfType aType) const;
123
124
125 //! Returns the reference to array Of F/F interferences <br>
126 Standard_EXPORT   BOPTools_CArray1OfSSInterference& SSInterferences() ;
127
128
129 //! Returns the reference to array Of E/F interferences <br>
130 Standard_EXPORT   BOPTools_CArray1OfESInterference& ESInterferences() ;
131
132
133 //! Returns the reference to array Of V/F interferences <br>
134 Standard_EXPORT   BOPTools_CArray1OfVSInterference& VSInterferences() ;
135
136
137 //! Returns the reference to arrray Of E/E interferences <br>
138 Standard_EXPORT   BOPTools_CArray1OfEEInterference& EEInterferences() ;
139
140
141 //! Returns the reference to arrray Of  V/E interferences <br>
142 Standard_EXPORT   BOPTools_CArray1OfVEInterference& VEInterferences() ;
143
144
145 //! Returns the reference to arrray Of  V/V interferences <br>
146 Standard_EXPORT   BOPTools_CArray1OfVVInterference& VVInterferences() ;
147
148
149
150
151
152 protected:
153
154  // Methods PROTECTED
155  // 
156
157
158  // Fields PROTECTED
159  //
160 NMTDS_MapOfPassKeyBoolean myTable[6];
161 NMTDS_ListOfPassKeyBoolean myList;
162 Standard_Integer myMaxInd;
163 BOPTools_CArray1OfSSInterference mySSInterferences;
164 BOPTools_CArray1OfESInterference myESInterferences;
165 BOPTools_CArray1OfVSInterference myVSInterferences;
166 BOPTools_CArray1OfEEInterference myEEInterferences;
167 BOPTools_CArray1OfVEInterference myVEInterferences;
168 BOPTools_CArray1OfVVInterference myVVInterferences;
169
170
171 private: 
172
173  // Methods PRIVATE
174  // 
175
176
177  // Fields PRIVATE
178  //
179
180
181 };
182
183
184
185
186
187 // other Inline functions and methods (like "C++: function call" methods)
188 //
189
190
191 #endif