Salome HOME
Addition of the 2 new unstructured mesh types.
[modules/med.git] / src / MEDCouplingCorba_Swig / MEDCouplingCorba.i
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D
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 // Author : Anthony Geay (CEA/DEN)
20
21 %module MEDCouplingCorba
22
23 %{
24 #include "MEDCouplingFieldDoubleServant.hxx"  
25 #include "MEDCouplingFieldTemplateServant.hxx"
26 #include "MEDCouplingMultiFieldsServant.hxx"
27 #include "MEDCouplingFieldOverTimeServant.hxx"
28 #include "MEDCouplingUMeshServant.hxx"
29 #include "MEDCoupling1SGTUMeshServant.hxx"
30 #include "MEDCoupling1DGTUMeshServant.hxx"
31 #include "MEDCouplingExtrudedMeshServant.hxx"
32 #include "MEDCouplingCMeshServant.hxx"
33 #include "MEDCouplingCurveLinearMeshServant.hxx"
34 #include "DataArrayDoubleServant.hxx"
35 #include "DataArrayIntServant.hxx"
36 #include "MEDCouplingCorbaTypemaps.i"
37
38 using namespace ParaMEDMEM;
39 %}
40
41 %include "MEDCouplingCommon.i"
42
43 namespace ParaMEDMEM
44 {
45   class MEDCouplingFieldDoubleServant
46   {
47   public:
48     %extend
49        {
50          static PyObject *_this(const MEDCouplingFieldDouble *cppPointerOfMesh)
51          {
52            return buildServantAndActivate<MEDCouplingFieldDoubleServant>(cppPointerOfMesh);
53          }
54          
55          static PyObject *_this2(const MEDCouplingFieldDouble *cppPointerOfMesh)
56          {
57            return buildServantAndActivate2<MEDCouplingFieldDoubleServant>(cppPointerOfMesh);
58          }
59        }
60   };
61
62   class MEDCouplingFieldTemplateServant
63   {
64   public:
65     %extend
66        {
67          static PyObject *_this(const MEDCouplingFieldTemplate *cppPointerOfMesh)
68          {
69            return buildServantAndActivate<MEDCouplingFieldTemplateServant>(cppPointerOfMesh);
70          }
71          
72          static PyObject *_this2(const MEDCouplingFieldTemplate *cppPointerOfMesh)
73          {
74            return buildServantAndActivate2<MEDCouplingFieldTemplateServant>(cppPointerOfMesh);
75          }
76        }
77   };
78
79   class MEDCouplingMultiFieldsServant
80   {
81   public:
82     %extend
83        {
84          static PyObject *_this(const MEDCouplingMultiFields *cppPointerOfMesh)
85          {
86            return buildServantAndActivate<MEDCouplingMultiFieldsServant>(cppPointerOfMesh);
87          }
88
89          static PyObject *_this2(const MEDCouplingMultiFields *cppPointerOfMesh)
90          {
91            return buildServantAndActivate2<MEDCouplingMultiFieldsServant>(cppPointerOfMesh);
92          }
93        }
94   };
95
96   class MEDCouplingFieldOverTimeServant
97   {
98   public:
99     %extend
100        {
101          static PyObject *_this(const MEDCouplingFieldOverTime *cppPointerOfMesh)
102          {
103            return buildServantAndActivate<MEDCouplingFieldOverTimeServant>(cppPointerOfMesh);
104          }
105
106          static PyObject *_this2(const MEDCouplingFieldOverTime *cppPointerOfMesh)
107          {
108            return buildServantAndActivate2<MEDCouplingFieldOverTimeServant>(cppPointerOfMesh);
109          }
110        }
111   };
112
113   class MEDCouplingUMeshServant
114   {
115   public:
116     %extend
117        {
118          static PyObject *_this(const MEDCouplingUMesh *cppPointerOfMesh)
119          {
120            return buildServantAndActivate<MEDCouplingUMeshServant>(cppPointerOfMesh);
121          }
122
123          static PyObject *_this2(const MEDCouplingUMesh *cppPointerOfMesh)
124          {
125            return buildServantAndActivate2<MEDCouplingUMeshServant>(cppPointerOfMesh);
126          }
127        }
128   };
129
130   class MEDCoupling1SGTUMeshServant
131   {
132   public:
133     %extend
134        {
135          static PyObject *_this(const MEDCoupling1SGTUMesh *cppPointerOfMesh)
136          {
137            return buildServantAndActivate<MEDCoupling1SGTUMeshServant>(cppPointerOfMesh);
138          }
139
140          static PyObject *_this2(const MEDCoupling1SGTUMesh *cppPointerOfMesh)
141          {
142            return buildServantAndActivate2<MEDCoupling1SGTUMeshServant>(cppPointerOfMesh);
143          }
144        }
145   };
146
147   class MEDCoupling1DGTUMeshServant
148   {
149   public:
150     %extend
151        {
152          static PyObject *_this(const MEDCoupling1DGTUMesh *cppPointerOfMesh)
153          {
154            return buildServantAndActivate<MEDCoupling1DGTUMeshServant>(cppPointerOfMesh);
155          }
156
157          static PyObject *_this2(const MEDCoupling1DGTUMesh *cppPointerOfMesh)
158          {
159            return buildServantAndActivate2<MEDCoupling1DGTUMeshServant>(cppPointerOfMesh);
160          }
161        }
162   };
163
164   class MEDCouplingExtrudedMeshServant
165   {
166   public:
167     %extend
168        {
169          static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh)
170          {
171            return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
172          }
173
174          static PyObject *_this2(const MEDCouplingExtrudedMesh *cppPointerOfMesh)
175          {
176            return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
177          }
178        }
179   };
180
181   class MEDCouplingCMeshServant
182   {
183   public:
184     %extend
185        {
186          static PyObject *_this(const MEDCouplingCMesh *cppPointerOfMesh)
187          {
188            return buildServantAndActivate<MEDCouplingCMeshServant>(cppPointerOfMesh);
189          }
190          
191          static PyObject *_this2(const MEDCouplingCMesh *cppPointerOfMesh)
192          {
193            return buildServantAndActivate2<MEDCouplingCMeshServant>(cppPointerOfMesh);
194          }
195        }
196   };
197
198   class MEDCouplingCurveLinearMeshServant
199   {
200   public:
201     %extend
202        {
203          static PyObject *_this(const MEDCouplingCurveLinearMesh *cppPointerOfMesh)
204          {
205            return buildServantAndActivate<MEDCouplingCurveLinearMeshServant>(cppPointerOfMesh);
206          }
207
208          static PyObject *_this2(const MEDCouplingCurveLinearMesh *cppPointerOfMesh)
209          {
210            return buildServantAndActivate2<MEDCouplingCurveLinearMeshServant>(cppPointerOfMesh);
211          }
212        }
213   };
214
215   class DataArrayDoubleServant
216   {
217   public:
218     %extend
219        {
220          static PyObject *_this(const DataArrayDouble *cppPointerOfMesh)
221          {
222            return buildServantAndActivate<DataArrayDoubleServant>(cppPointerOfMesh);
223          }
224
225          static PyObject *_this2(const DataArrayDouble *cppPointerOfMesh)
226          {
227            return buildServantAndActivate2<DataArrayDoubleServant>(cppPointerOfMesh);
228          }
229        }
230   };
231
232   class DataArrayIntServant
233   {
234   public:
235     %extend
236        {
237          static PyObject *_this(const DataArrayInt *cppPointerOfMesh)
238          {
239            return buildServantAndActivate<DataArrayIntServant>(cppPointerOfMesh);
240          }
241
242          static PyObject *_this2(const DataArrayInt *cppPointerOfMesh)
243          {
244            return buildServantAndActivate2<DataArrayIntServant>(cppPointerOfMesh);
245          }
246        }
247   };
248 }
249
250 %pythoncode %{
251 def ParaMEDMEMDataArrayDoubleIadd(self,*args):
252     import _MEDCouplingCorba
253     return _MEDCouplingCorba.DataArrayDouble____iadd___(self, self, *args)
254 def ParaMEDMEMDataArrayDoubleIsub(self,*args):
255     import _MEDCouplingCorba
256     return _MEDCouplingCorba.DataArrayDouble____isub___(self, self, *args)
257 def ParaMEDMEMDataArrayDoubleImul(self,*args):
258     import _MEDCouplingCorba
259     return _MEDCouplingCorba.DataArrayDouble____imul___(self, self, *args)
260 def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
261     import _MEDCouplingCorba
262     return _MEDCouplingCorba.DataArrayDouble____idiv___(self, self, *args)
263 def ParaMEDMEMDataArrayDoubleIpow(self,*args):
264     import _MEDCouplingCorba
265     return _MEDCouplingCorba.DataArrayDouble____ipow___(self, self, *args)
266 def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
267     import _MEDCouplingCorba
268     return _MEDCouplingCorba.MEDCouplingFieldDouble____iadd___(self, self, *args)
269 def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
270     import _MEDCouplingCorba
271     return _MEDCouplingCorba.MEDCouplingFieldDouble____isub___(self, self, *args)
272 def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
273     import _MEDCouplingCorba
274     return _MEDCouplingCorba.MEDCouplingFieldDouble____imul___(self, self, *args)
275 def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
276     import _MEDCouplingCorba
277     return _MEDCouplingCorba.MEDCouplingFieldDouble____idiv___(self, self, *args)
278 def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
279     import _MEDCouplingCorba
280     return _MEDCouplingCorba.MEDCouplingFieldDouble____ipow___(self, self, *args)
281 def ParaMEDMEMDataArrayIntIadd(self,*args):
282     import _MEDCouplingCorba
283     return _MEDCouplingCorba.DataArrayInt____iadd___(self, self, *args)
284 def ParaMEDMEMDataArrayIntIsub(self,*args):
285     import _MEDCouplingCorba
286     return _MEDCouplingCorba.DataArrayInt____isub___(self, self, *args)
287 def ParaMEDMEMDataArrayIntImul(self,*args):
288     import _MEDCouplingCorba
289     return _MEDCouplingCorba.DataArrayInt____imul___(self, self, *args)
290 def ParaMEDMEMDataArrayIntIdiv(self,*args):
291     import _MEDCouplingCorba
292     return _MEDCouplingCorba.DataArrayInt____idiv___(self, self, *args)
293 def ParaMEDMEMDataArrayIntImod(self,*args):
294     import _MEDCouplingCorba
295     return _MEDCouplingCorba.DataArrayInt____imod___(self, self, *args)
296 def ParaMEDMEMDataArrayIntIpow(self,*args):
297     import _MEDCouplingCorba
298     return _MEDCouplingCorba.DataArrayInt____ipow___(self, self, *args)
299 def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
300     import _MEDCouplingCorba
301     return _MEDCouplingCorba.DataArrayDoubleTuple____iadd___(self, self, *args)
302 def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
303     import _MEDCouplingCorba
304     return _MEDCouplingCorba.DataArrayDoubleTuple____isub___(self, self, *args)
305 def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
306     import _MEDCouplingCorba
307     return _MEDCouplingCorba.DataArrayDoubleTuple____imul___(self, self, *args)
308 def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
309     import _MEDCouplingCorba
310     return _MEDCouplingCorba.DataArrayDoubleTuple____idiv___(self, self, *args)
311 def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
312     import _MEDCouplingCorba
313     return _MEDCouplingCorba.DataArrayIntTuple____iadd___(self, self, *args)
314 def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
315     import _MEDCouplingCorba
316     return _MEDCouplingCorba.DataArrayIntTuple____isub___(self, self, *args)
317 def ParaMEDMEMDataArrayIntTupleImul(self,*args):
318     import _MEDCouplingCorba
319     return _MEDCouplingCorba.DataArrayIntTuple____imul___(self, self, *args)
320 def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
321     import _MEDCouplingCorba
322     return _MEDCouplingCorba.DataArrayIntTuple____idiv___(self, self, *args)
323 def ParaMEDMEMDataArrayIntTupleImod(self,*args):
324     import _MEDCouplingCorba
325     return _MEDCouplingCorba.DataArrayIntTuple____imod___(self, self, *args)
326 %}
327
328 %include "MEDCouplingFinalize.i"