Salome HOME
Added help page and revert some changes for a better ergonomy
[modules/geom.git] / src / NMTDS / NMTDS_InterfPool.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE\r
2 //\r
3 // This library is free software; you can redistribute it and/or\r
4 // modify it under the terms of the GNU Lesser General Public\r
5 // License as published by the Free Software Foundation; either\r
6 // version 2.1 of the License.\r
7 //\r
8 // This library is distributed in the hope that it will be useful,\r
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
11 // Lesser General Public License for more details.\r
12 //\r
13 // You should have received a copy of the GNU Lesser General Public\r
14 // License along with this library; if not, write to the Free Software\r
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
16 //\r
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
18 \r
19 #ifndef _NMTDS_InterfPool_HeaderFile\r
20 #define _NMTDS_InterfPool_HeaderFile\r
21 \r
22 #ifndef _Standard_HeaderFile\r
23 #include <Standard.hxx>\r
24 #endif\r
25 #ifndef _Standard_Macro_HeaderFile\r
26 #include <Standard_Macro.hxx>\r
27 #endif\r
28 \r
29 #ifndef _NMTDS_MapOfPairBoolean_HeaderFile\r
30 #include <NMTDS_MapOfPairBoolean.hxx>\r
31 #endif\r
32 #ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
33 #include <NMTDS_ListOfPairBoolean.hxx>\r
34 #endif\r
35 #ifndef _Standard_Integer_HeaderFile\r
36 #include <Standard_Integer.hxx>\r
37 #endif\r
38 #ifndef _BOPTools_CArray1OfSSInterference_HeaderFile\r
39 #include <BOPTools_CArray1OfSSInterference.hxx>\r
40 #endif\r
41 #ifndef _BOPTools_CArray1OfESInterference_HeaderFile\r
42 #include <BOPTools_CArray1OfESInterference.hxx>\r
43 #endif\r
44 #ifndef _BOPTools_CArray1OfVSInterference_HeaderFile\r
45 #include <BOPTools_CArray1OfVSInterference.hxx>\r
46 #endif\r
47 #ifndef _BOPTools_CArray1OfEEInterference_HeaderFile\r
48 #include <BOPTools_CArray1OfEEInterference.hxx>\r
49 #endif\r
50 #ifndef _BOPTools_CArray1OfVEInterference_HeaderFile\r
51 #include <BOPTools_CArray1OfVEInterference.hxx>\r
52 #endif\r
53 #ifndef _BOPTools_CArray1OfVVInterference_HeaderFile\r
54 #include <BOPTools_CArray1OfVVInterference.hxx>\r
55 #endif\r
56 #ifndef _Standard_Boolean_HeaderFile\r
57 #include <Standard_Boolean.hxx>\r
58 #endif\r
59 #ifndef _NMTDS_InterfType_HeaderFile\r
60 #include <NMTDS_InterfType.hxx>\r
61 #endif\r
62 class NMTDS_PairBoolean;\r
63 class NMTDS_ListOfPairBoolean;\r
64 class BOPTools_CArray1OfSSInterference;\r
65 class BOPTools_CArray1OfESInterference;\r
66 class BOPTools_CArray1OfVSInterference;\r
67 class BOPTools_CArray1OfEEInterference;\r
68 class BOPTools_CArray1OfVEInterference;\r
69 class BOPTools_CArray1OfVVInterference;\r
70 \r
71 \r
72 \r
73 class NMTDS_InterfPool  {\r
74 public:\r
75 \r
76   void* operator new(size_t,void* anAddress) \r
77   {\r
78     return anAddress;\r
79   }\r
80   void* operator new(size_t size) \r
81   {\r
82     return Standard::Allocate(size); \r
83   }\r
84   void  operator delete(void *anAddress) \r
85   {\r
86     if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
87   }\r
88 \r
89   \r
90   Standard_EXPORT   NMTDS_InterfPool();\r
91 Standard_EXPORT virtual ~NMTDS_InterfPool();\r
92   \r
93   Standard_EXPORT     Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,const NMTDS_InterfType aType) ;\r
94   \r
95   Standard_EXPORT     Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const NMTDS_InterfType aType) ;\r
96   \r
97   Standard_EXPORT     Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const Standard_Boolean bFlag,const NMTDS_InterfType aType) ;\r
98   \r
99   Standard_EXPORT     Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;\r
100   \r
101   Standard_EXPORT     Standard_Boolean Contains(const Standard_Integer aInd1,const Standard_Integer aInd2) const;\r
102   \r
103   Standard_EXPORT    const NMTDS_ListOfPairBoolean& Get() const;\r
104   \r
105   Standard_EXPORT    const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const;\r
106   \r
107   Standard_EXPORT    const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const;\r
108   \r
109   Standard_EXPORT    const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,const NMTDS_InterfType aType) const;\r
110   \r
111 //! Returns the reference to array Of F/F interferences <br>\r
112   Standard_EXPORT     BOPTools_CArray1OfSSInterference& SSInterferences() ;\r
113   \r
114 //! Returns the reference to array Of E/F interferences <br>\r
115   Standard_EXPORT     BOPTools_CArray1OfESInterference& ESInterferences() ;\r
116   \r
117 //! Returns the reference to array Of V/F interferences <br>\r
118   Standard_EXPORT     BOPTools_CArray1OfVSInterference& VSInterferences() ;\r
119   \r
120 //! Returns the reference to arrray Of E/E interferences <br>\r
121   Standard_EXPORT     BOPTools_CArray1OfEEInterference& EEInterferences() ;\r
122   \r
123 //! Returns the reference to arrray Of  V/E interferences <br>\r
124   Standard_EXPORT     BOPTools_CArray1OfVEInterference& VEInterferences() ;\r
125   \r
126 //! Returns the reference to arrray Of  V/V interferences <br>\r
127   Standard_EXPORT     BOPTools_CArray1OfVVInterference& VVInterferences() ;\r
128   \r
129   Standard_EXPORT     void Purge() ;\r
130 \r
131 \r
132 \r
133 \r
134 \r
135 protected:\r
136 \r
137 \r
138 \r
139 NMTDS_MapOfPairBoolean myTable[6];\r
140 NMTDS_ListOfPairBoolean myList;\r
141 Standard_Integer myMaxInd;\r
142 BOPTools_CArray1OfSSInterference mySSInterferences;\r
143 BOPTools_CArray1OfESInterference myESInterferences;\r
144 BOPTools_CArray1OfVSInterference myVSInterferences;\r
145 BOPTools_CArray1OfEEInterference myEEInterferences;\r
146 BOPTools_CArray1OfVEInterference myVEInterferences;\r
147 BOPTools_CArray1OfVVInterference myVVInterferences;\r
148 \r
149 \r
150 private:\r
151 \r
152 \r
153 \r
154 \r
155 \r
156 };\r
157 \r
158 \r
159 \r
160 \r
161 \r
162 // other Inline functions and methods (like "C++: function call" methods)\r
163 \r
164 \r
165 #endif\r