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