]> SALOME platform Git repositories - modules/med.git/blob - src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i
Salome HOME
f0f86d72bd1e98cb9fd9d7883ecc0e0e2a259068
[modules/med.git] / src / MEDCouplingCorba_Swig / Client / MEDCouplingClient.i
1 // Copyright (C) 2007-2019  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, or (at your option) any later version.
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 MEDCouplingClient
22
23 %{
24 #include "MEDCouplingFieldDoubleClient.hxx"
25 #include "MEDCouplingFieldTemplateClient.hxx"
26 #include "MEDCouplingMultiFieldsClient.hxx"
27 #include "MEDCouplingFieldOverTimeClient.hxx"
28 #include "MEDCouplingUMeshClient.hxx"
29 #include "MEDCoupling1SGTUMeshClient.hxx"
30 #include "MEDCoupling1DGTUMeshClient.hxx"
31 #include "MEDCouplingExtrudedMeshClient.hxx"
32 #include "MEDCouplingCMeshClient.hxx"
33 #include "MEDCouplingIMeshClient.hxx"
34 #include "MEDCouplingCurveLinearMeshClient.hxx"
35 #include "DataArrayDoubleClient.hxx"
36 #include "DataArrayIntClient.hxx"
37
38 #include <iostream>
39
40 using namespace MEDCoupling;
41 %}
42
43 %include "MEDCouplingCommon.i"
44
45 %newobject MEDCoupling::MEDCouplingFieldDoubleClient::New;
46 %newobject MEDCoupling::MEDCouplingFieldTemplateClient::New;
47 %newobject MEDCoupling::MEDCouplingUMeshClient::New;
48 %newobject MEDCoupling::MEDCoupling1SGTUMeshClient::New;
49 %newobject MEDCoupling::MEDCoupling1DGTUMeshClient::New;
50 %newobject MEDCoupling::MEDCouplingExtrudedMeshClient::New;
51 %newobject MEDCoupling::MEDCouplingCMeshClient::New;
52 %newobject MEDCoupling::MEDCouplingIMeshClient::New;
53 %newobject MEDCoupling::MEDCouplingCurveLinearMeshClient::New;
54 %newobject MEDCoupling::MEDCouplingMultiFieldsClient::New;
55 %newobject MEDCoupling::MEDCouplingFieldOverTimeClient::New;
56 %newobject MEDCoupling::DataArrayDoubleClient::New;
57 %newobject MEDCoupling::DataArrayIntClient::New;
58
59 %nodefaultctor;
60 %nodefaultdtor;
61
62 %{
63 #if PY_VERSION_HEX < 0x03050000
64 static char*
65 Py_EncodeLocale(const wchar_t *text, size_t *error_pos)
66 {
67    return _Py_wchar2char(text, error_pos);
68 }
69 #endif
70 %}
71
72 namespace MEDCoupling
73 {
74   class MEDCouplingFieldDoubleClient
75   {
76   public:
77     %extend
78       {
79         static MEDCouplingFieldDouble *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
80         {
81           PyObject* pdict=PyDict_New();
82           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
83           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
84           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
85           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
86           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
87           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
88           PyObject *iorField=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",fieldPtr);
89           if(!iorField)
90             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingFieldDoubleClient.New appears to differ from CORBA reference ! Expecting a FieldDouble CORBA reference !");
91           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorField), NULL);
92           int argc=0;
93           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
94           CORBA::Object_var fieldPtrCpp=orb->string_to_object(ior);
95           SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_var fieldPtrCppC=SALOME_MED::MEDCouplingFieldDoubleCorbaInterface::_narrow(fieldPtrCpp);
96           if(CORBA::is_nil(fieldPtrCppC))
97             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingFieldDoubleCorbaInterface_ptr !");
98           Py_DECREF(pdict);
99           Py_DECREF(iorField);
100           MEDCouplingFieldDouble *ret=MEDCouplingFieldDoubleClient::New(fieldPtrCppC);
101           return ret;
102         } 
103       }
104   };
105
106   class MEDCouplingFieldTemplateClient
107   {
108   public:
109     %extend
110       {
111         static MEDCouplingFieldTemplate *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
112         {
113           PyObject* pdict=PyDict_New();
114           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
115           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
116           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
117           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
118           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
119           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
120           PyObject *iorField=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",fieldPtr);
121           if(!iorField)
122             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingFieldTemplateClient.New appears to differ from CORBA reference ! Expecting a FieldTemplate CORBA reference !");
123           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorField), NULL);
124           int argc=0;
125           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
126           CORBA::Object_var fieldPtrCpp=orb->string_to_object(ior);
127           SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_var fieldPtrCppC=SALOME_MED::MEDCouplingFieldTemplateCorbaInterface::_narrow(fieldPtrCpp);
128           if(CORBA::is_nil(fieldPtrCppC))
129             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingFieldTemplateCorbaInterface_ptr !");
130           Py_DECREF(pdict);
131           Py_DECREF(iorField);
132           MEDCouplingFieldTemplate *ret=MEDCouplingFieldTemplateClient::New(fieldPtrCppC);
133           return ret;
134         } 
135       }
136   };
137
138   class MEDCouplingMultiFieldsClient
139   {
140   public:
141     %extend
142       {
143         static MEDCouplingMultiFields *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
144         {
145           PyObject* pdict=PyDict_New();
146           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
147           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
148           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
149           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
150           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
151           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
152           PyObject *iorField=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",fieldPtr);
153           if(!iorField)
154             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingFieldTemplateClient.New appears to differ from CORBA reference ! Expecting a MultiFields CORBA reference !");
155           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorField), NULL);
156           int argc=0;
157           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
158           CORBA::Object_var fieldPtrCpp=orb->string_to_object(ior);
159           SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_var fieldPtrCppC=SALOME_MED::MEDCouplingMultiFieldsCorbaInterface::_narrow(fieldPtrCpp);
160           if(CORBA::is_nil(fieldPtrCppC))
161             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingMultiFieldsCorbaInterface_ptr !");
162           Py_DECREF(pdict);
163           Py_DECREF(iorField);
164           MEDCouplingMultiFields *ret=MEDCouplingMultiFieldsClient::New(fieldPtrCppC);
165           return ret;
166         } 
167       }
168   };
169
170   class MEDCouplingFieldOverTimeClient : public MEDCouplingFieldOverTime
171   {
172   public:
173     std::vector<double> getTimeSteps() const;
174     %extend
175       {
176         static MEDCouplingFieldOverTimeClient *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
177         {
178           PyObject* pdict=PyDict_New();
179           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
180           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
181           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
182           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
183           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
184           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
185           PyObject *iorField=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",fieldPtr);
186           if(!iorField)
187             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingFieldOverTimeClient.New appears to differ from CORBA reference ! Expecting a FieldOverTime CORBA reference !");
188           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorField), NULL);
189           int argc=0;
190           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
191           CORBA::Object_var fieldPtrCpp=orb->string_to_object(ior);
192           SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface_var fieldPtrCppC=SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface::_narrow(fieldPtrCpp);
193           if(CORBA::is_nil(fieldPtrCppC))
194             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingFieldOverTimeCorbaInterface_ptr !");
195           Py_DECREF(pdict);
196           Py_DECREF(iorField);
197           MEDCouplingFieldOverTimeClient *ret=MEDCouplingFieldOverTimeClient::New(fieldPtrCppC);
198           return ret;
199         } 
200       }
201   };
202
203   class MEDCouplingMeshClient
204   {
205   public:
206     %extend
207       {
208         static MEDCouplingMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
209         {
210           PyObject* pdict=PyDict_New();
211           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
212           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
213           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
214           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
215           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
216           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
217           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
218           if(!iorMesh)
219             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingMeshClient.New appears to differ from CORBA reference ! Expecting a MeshCorbaInterface CORBA reference !");
220           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
221           int argc=0;
222           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
223           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
224           SALOME_MED::MEDCouplingUMeshCorbaInterface_var meshPtrCppC1=SALOME_MED::MEDCouplingUMeshCorbaInterface::_narrow(meshPtrCpp);
225           if(!CORBA::is_nil(meshPtrCppC1))
226             {
227               Py_DECREF(pdict);
228               Py_DECREF(iorMesh);
229               return MEDCouplingUMeshClient::New(meshPtrCppC1);
230             }
231           SALOME_MED::MEDCouplingCMeshCorbaInterface_var meshPtrCppC2=SALOME_MED::MEDCouplingCMeshCorbaInterface::_narrow(meshPtrCpp);
232           if(!CORBA::is_nil(meshPtrCppC2))
233             {
234               Py_DECREF(pdict);
235               Py_DECREF(iorMesh);
236               return MEDCouplingCMeshClient::New(meshPtrCppC2);
237             }
238           SALOME_MED::MEDCouplingIMeshCorbaInterface_var meshPtrCppC7=SALOME_MED::MEDCouplingIMeshCorbaInterface::_narrow(meshPtrCpp);
239           if(!CORBA::is_nil(meshPtrCppC7))
240             {
241               Py_DECREF(pdict);
242               Py_DECREF(iorMesh);
243               return MEDCouplingIMeshClient::New(meshPtrCppC7);
244             }
245           SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var meshPtrCppC3=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtrCpp);
246           if(!CORBA::is_nil(meshPtrCppC3))
247             {
248               Py_DECREF(pdict);
249               Py_DECREF(iorMesh);
250               return MEDCouplingCurveLinearMeshClient::New(meshPtrCppC3);
251             }
252           SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_var meshPtrCppC4=SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface::_narrow(meshPtrCpp);
253           if(!CORBA::is_nil(meshPtrCppC4))
254             {
255               Py_DECREF(pdict);
256               Py_DECREF(iorMesh);
257               return MEDCoupling1SGTUMeshClient::New(meshPtrCppC4);
258             }
259           SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_var meshPtrCppC5=SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface::_narrow(meshPtrCpp);
260           if(!CORBA::is_nil(meshPtrCppC5))
261             {
262               Py_DECREF(pdict);
263               Py_DECREF(iorMesh);
264               return MEDCoupling1DGTUMeshClient::New(meshPtrCppC5);
265             }
266           SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_var meshPtrCppC6=SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface::_narrow(meshPtrCpp);
267           if(!CORBA::is_nil(meshPtrCppC6))
268             {
269               Py_DECREF(pdict);
270               Py_DECREF(iorMesh);
271               return MEDCouplingExtrudedMeshClient::New(meshPtrCppC6);
272             }
273           throw INTERP_KERNEL::Exception("Error input corba pointer is not a managed mesh type !");
274         } 
275       }
276   };
277
278   class MEDCouplingUMeshClient
279   {
280   public:
281     %extend
282       {
283         static MEDCouplingUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
284         {
285           PyObject* pdict=PyDict_New();
286           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
287           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
288           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
289           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
290           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
291           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
292           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
293           if(!iorMesh)
294             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingUMeshClient.New appears to differ from CORBA reference ! Expecting a UMeshCorbaInterface CORBA reference !");
295           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
296           int argc=0;
297           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
298           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
299           SALOME_MED::MEDCouplingUMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingUMeshCorbaInterface::_narrow(meshPtrCpp);
300           if(CORBA::is_nil(meshPtrCppC))
301             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingUMeshInterface_ptr !");
302           Py_DECREF(pdict);
303           Py_DECREF(iorMesh);
304           MEDCouplingUMesh *ret=MEDCouplingUMeshClient::New(meshPtrCppC);
305           return ret;
306         } 
307       }
308   };
309
310   class MEDCoupling1SGTUMeshClient
311   {
312   public:
313     %extend
314       {
315         static MEDCoupling1SGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
316         {
317           PyObject* pdict=PyDict_New();
318           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
319           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
320           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
321           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
322           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
323           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
324           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
325           if(!iorMesh)
326             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCoupling1SGTUMeshClient.New appears to differ from CORBA reference ! Expecting a 1SGTUMeshCorbaInterface CORBA reference !");
327           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
328           int argc=0;
329           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
330           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
331           SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface::_narrow(meshPtrCpp);
332           if(CORBA::is_nil(meshPtrCppC))
333             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCoupling1SGTUMeshInterface_ptr !");
334           Py_DECREF(pdict);
335           Py_DECREF(iorMesh);
336           MEDCoupling1SGTUMesh *ret=MEDCoupling1SGTUMeshClient::New(meshPtrCppC);
337           return ret;
338         } 
339       }
340   };
341
342   class MEDCoupling1DGTUMeshClient
343   {
344   public:
345     %extend
346       {
347         static MEDCoupling1DGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
348         {
349           PyObject* pdict=PyDict_New();
350           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
351           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
352           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
353           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
354           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
355           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
356           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
357           if(!iorMesh)
358             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCoupling1DGTUMeshClient.New appears to differ from CORBA reference ! Expecting a 1DGTUMeshCorbaInterface CORBA reference !");
359           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
360           int argc=0;
361           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
362           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
363           SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface::_narrow(meshPtrCpp);
364           if(CORBA::is_nil(meshPtrCppC))
365             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCoupling1DGTUMeshInterface_ptr !");
366           Py_DECREF(pdict);
367           Py_DECREF(iorMesh);
368           MEDCoupling1DGTUMesh *ret=MEDCoupling1DGTUMeshClient::New(meshPtrCppC);
369           return ret;
370         } 
371       }
372   };
373
374   class MEDCouplingExtrudedMeshClient
375   {
376   public:
377     %extend
378       {
379         static MEDCouplingMappedExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
380         {
381           PyObject* pdict=PyDict_New();
382           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
383           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
384           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
385           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
386           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
387           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
388           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
389           if(!iorMesh)
390             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingExtrudedMeshClient.New appears to differ from CORBA reference ! Expecting an ExtrudedMeshCorbaInterface CORBA reference !");
391           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
392           int argc=0;
393           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
394           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
395           SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface::_narrow(meshPtrCpp);
396           if(CORBA::is_nil(meshPtrCppC))
397             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingExtrudedMeshInterface_ptr !");
398           Py_DECREF(pdict);
399           Py_DECREF(iorMesh);
400           MEDCouplingMappedExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
401           return ret;
402         } 
403       }
404   };
405
406   class MEDCouplingCMeshClient
407   {
408   public:
409     %extend
410       {
411         static MEDCouplingCMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
412         {
413           PyObject* pdict=PyDict_New();
414           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
415           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
416           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
417           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
418           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
419           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
420           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
421           if(!iorMesh)
422             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingCMeshClient.New appears to differ from CORBA reference ! Expecting a CMeshCorbaInterface CORBA reference !");
423           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
424           int argc=0;
425           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
426           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
427           SALOME_MED::MEDCouplingCMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingCMeshCorbaInterface::_narrow(meshPtrCpp);
428           if(CORBA::is_nil(meshPtrCppC))
429             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingCMeshInterface_ptr !");
430           Py_DECREF(pdict);
431           Py_DECREF(iorMesh);
432           MEDCouplingCMesh *ret=MEDCouplingCMeshClient::New(meshPtrCppC);
433           return ret;
434         } 
435       }
436   };
437
438   class MEDCouplingIMeshClient
439   {
440   public:
441     %extend
442       {
443         static MEDCouplingIMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
444         {
445           PyObject* pdict=PyDict_New();
446           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
447           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
448           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
449           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
450           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
451           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
452           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
453           if(!iorMesh)
454             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingIMeshClient.New appears to differ from CORBA reference ! Expecting a IMeshCorbaInterface CORBA reference !");
455           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
456           int argc=0;
457           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
458           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
459           SALOME_MED::MEDCouplingIMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingIMeshCorbaInterface::_narrow(meshPtrCpp);
460           if(CORBA::is_nil(meshPtrCppC))
461             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingIMeshInterface_ptr !");
462           Py_DECREF(pdict);
463           Py_DECREF(iorMesh);
464           MEDCouplingIMesh *ret=MEDCouplingIMeshClient::New(meshPtrCppC);
465           return ret;
466         } 
467       }
468   };
469
470   class MEDCouplingCurveLinearMeshClient
471   {
472   public:
473     %extend
474       {
475         static MEDCouplingCurveLinearMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
476         {
477           PyObject* pdict=PyDict_New();
478           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
479           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
480           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
481           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
482           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
483           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
484           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
485           if(!iorMesh)
486             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingCurveLinearMeshClient.New appears to differ from CORBA reference ! Expecting a CurveLinearMeshCorbaInterface CORBA reference !");
487           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
488           int argc=0;
489           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
490           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
491           SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtrCpp);
492           if(CORBA::is_nil(meshPtrCppC))
493             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingCurveLinearMeshInterface_ptr !");
494           Py_DECREF(pdict);
495           Py_DECREF(iorMesh);
496           MEDCouplingCurveLinearMesh *ret=MEDCouplingCurveLinearMeshClient::New(meshPtrCppC);
497           return ret;
498         } 
499       }
500   };
501
502   class DataArrayDoubleClient
503   {
504   public:
505     %extend
506       {
507         static DataArrayDouble *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
508         {
509           PyObject* pdict=PyDict_New();
510           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
511           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
512           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
513           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
514           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
515           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
516           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
517           if(!iorMesh)
518             throw INTERP_KERNEL::Exception("Error : the input parameter of DataArrayDoubleClient.New appears to differ from CORBA reference ! Expecting a DataArrayDoubleCorbaInterface CORBA reference !");
519           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
520           int argc=0;
521           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
522           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
523           SALOME_MED::DataArrayDoubleCorbaInterface_var meshPtrCppC=SALOME_MED::DataArrayDoubleCorbaInterface::_narrow(meshPtrCpp);
524           if(CORBA::is_nil(meshPtrCppC))
525             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.DataArrayDoubleInterface_ptr ");
526           Py_DECREF(pdict);
527           Py_DECREF(iorMesh);
528           DataArrayDouble *ret=DataArrayDoubleClient::New(meshPtrCppC);
529           return ret;
530         } 
531       }
532   };
533
534   class DataArrayIntClient
535   {
536   public:
537     %extend
538       {
539         static DataArrayInt *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
540         {
541           PyObject* pdict=PyDict_New();
542           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
543           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
544           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
545           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
546           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
547           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
548           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
549           if(!iorMesh)
550             throw INTERP_KERNEL::Exception("Error : the input parameter of DataArrayIntClient.New appears to differ from CORBA reference ! Expecting a DataArrayIntCorbaInterface CORBA reference !");
551           char *ior=Py_EncodeLocale(PyUnicode_AS_UNICODE(iorMesh), NULL);
552           int argc=0;
553           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
554           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
555           SALOME_MED::DataArrayIntCorbaInterface_var meshPtrCppC=SALOME_MED::DataArrayIntCorbaInterface::_narrow(meshPtrCpp);
556           if(CORBA::is_nil(meshPtrCppC))
557             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.DataArrayIntInterface_ptr !");
558           Py_DECREF(pdict);
559           Py_DECREF(iorMesh);
560           DataArrayInt *ret=DataArrayIntClient::New(meshPtrCppC);
561           return ret;
562         } 
563       }
564   };
565 }
566
567 %pythoncode %{
568 def MEDCouplingDataArrayDoubleIadd(self,*args):
569     import _MEDCouplingClient
570     return _MEDCouplingClient.DataArrayDouble____iadd___(self, self, *args)
571 def MEDCouplingDataArrayDoubleIsub(self,*args):
572     import _MEDCouplingClient
573     return _MEDCouplingClient.DataArrayDouble____isub___(self, self, *args)
574 def MEDCouplingDataArrayDoubleImul(self,*args):
575     import _MEDCouplingClient
576     return _MEDCouplingClient.DataArrayDouble____imul___(self, self, *args)
577 def MEDCouplingDataArrayDoubleIdiv(self,*args):
578     import _MEDCouplingClient
579     return _MEDCouplingClient.DataArrayDouble____idiv___(self, self, *args)
580 def MEDCouplingDataArrayDoubleIpow(self,*args):
581     import _MEDCouplingClient
582     return _MEDCouplingClient.DataArrayDouble____ipow___(self, self, *args)
583 def MEDCouplingFieldDoubleIadd(self,*args):
584     import _MEDCouplingClient
585     return _MEDCouplingClient.MEDCouplingFieldDouble____iadd___(self, self, *args)
586 def MEDCouplingFieldDoubleIsub(self,*args):
587     import _MEDCouplingClient
588     return _MEDCouplingClient.MEDCouplingFieldDouble____isub___(self, self, *args)
589 def MEDCouplingFieldDoubleImul(self,*args):
590     import _MEDCouplingClient
591     return _MEDCouplingClient.MEDCouplingFieldDouble____imul___(self, self, *args)
592 def MEDCouplingFieldDoubleIdiv(self,*args):
593     import _MEDCouplingClient
594     return _MEDCouplingClient.MEDCouplingFieldDouble____idiv___(self, self, *args)
595 def MEDCouplingFieldDoubleIpow(self,*args):
596     import _MEDCouplingClient
597     return _MEDCouplingClient.MEDCouplingFieldDouble____ipow___(self, self, *args)
598 def MEDCouplingDataArrayIntIadd(self,*args):
599     import _MEDCouplingClient
600     return _MEDCouplingClient.DataArrayInt____iadd___(self, self, *args)
601 def MEDCouplingDataArrayIntIsub(self,*args):
602     import _MEDCouplingClient
603     return _MEDCouplingClient.DataArrayInt____isub___(self, self, *args)
604 def MEDCouplingDataArrayIntImul(self,*args):
605     import _MEDCouplingClient
606     return _MEDCouplingClient.DataArrayInt____imul___(self, self, *args)
607 def MEDCouplingDataArrayIntIdiv(self,*args):
608     import _MEDCouplingClient
609     return _MEDCouplingClient.DataArrayInt____idiv___(self, self, *args)
610 def MEDCouplingDataArrayIntImod(self,*args):
611     import _MEDCouplingClient
612     return _MEDCouplingClient.DataArrayInt____imod___(self, self, *args)
613 def MEDCouplingDataArrayIntIpow(self,*args):
614     import _MEDCouplingClient
615     return _MEDCouplingClient.DataArrayInt____ipow___(self, self, *args)
616 def MEDCouplingDataArrayFloatIadd(self,*args):
617     import _MEDCouplingClient
618     return _MEDCouplingClient.DataArrayFloat____iadd___(self, self, *args)
619 def MEDCouplingDataArrayFloatIsub(self,*args):
620     import _MEDCouplingClient
621     return _MEDCouplingClient.DataArrayFloat____isub___(self, self, *args)
622 def MEDCouplingDataArrayFloatImul(self,*args):
623     import _MEDCouplingClient
624     return _MEDCouplingClient.DataArrayFloat____imul___(self, self, *args)
625 def MEDCouplingDataArrayFloatIdiv(self,*args):
626     import _MEDCouplingClient
627     return _MEDCouplingClient.DataArrayFloat____idiv___(self, self, *args)
628 def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
629     import _MEDCouplingClient
630     return _MEDCouplingClient.DataArrayDoubleTuple____iadd___(self, self, *args)
631 def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
632     import _MEDCouplingClient
633     return _MEDCouplingClient.DataArrayDoubleTuple____isub___(self, self, *args)
634 def MEDCouplingDataArrayDoubleTupleImul(self,*args):
635     import _MEDCouplingClient
636     return _MEDCouplingClient.DataArrayDoubleTuple____imul___(self, self, *args)
637 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
638     import _MEDCouplingClient
639     return _MEDCouplingClient.DataArrayDoubleTuple____idiv___(self, self, *args)
640 def MEDCouplingDataArrayIntTupleIadd(self,*args):
641     import _MEDCouplingClient
642     return _MEDCouplingClient.DataArrayIntTuple____iadd___(self, self, *args)
643 def MEDCouplingDataArrayIntTupleIsub(self,*args):
644     import _MEDCouplingClient
645     return _MEDCouplingClient.DataArrayIntTuple____isub___(self, self, *args)
646 def MEDCouplingDataArrayIntTupleImul(self,*args):
647     import _MEDCouplingClient
648     return _MEDCouplingClient.DataArrayIntTuple____imul___(self, self, *args)
649 def MEDCouplingDataArrayIntTupleIdiv(self,*args):
650     import _MEDCouplingClient
651     return _MEDCouplingClient.DataArrayIntTuple____idiv___(self, self, *args)
652 def MEDCouplingDataArrayIntTupleImod(self,*args):
653     import _MEDCouplingClient
654     return _MEDCouplingClient.DataArrayIntTuple____imod___(self, self, *args)
655 def MEDCouplingDenseMatrixIadd(self,*args):
656     import _MEDCouplingClient
657     return _MEDCouplingClient.DenseMatrix____iadd___(self, self, *args)
658 def MEDCouplingDenseMatrixIsub(self,*args):
659     import _MEDCouplingClient
660     return _MEDCouplingClient.DenseMatrix____isub___(self, self, *args)
661 %}
662
663 %include "MEDCouplingFinalize.i"