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