]> SALOME platform Git repositories - modules/med.git/blob - src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i
Salome HOME
842590f429cf0005bf4ff5eccd306b496cb6b30a
[modules/med.git] / src / MEDCouplingCorba_Swig / Client / MEDCouplingClient.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 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 MEDCouplingUMeshClient
192   {
193   public:
194     %extend
195       {
196         static MEDCouplingUMesh *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 MEDCouplingUMeshClient.New appears to differ from CORBA reference ! Expecting a UMeshCorbaInterface 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 meshPtrCppC=SALOME_MED::MEDCouplingUMeshCorbaInterface::_narrow(meshPtrCpp);
213           if(CORBA::is_nil(meshPtrCppC))
214             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingUMeshInterface_ptr !");
215           Py_DECREF(pdict);
216           Py_DECREF(iorMesh);
217           MEDCouplingUMesh *ret=MEDCouplingUMeshClient::New(meshPtrCppC);
218           return ret;
219         } 
220       }
221   };
222
223   class MEDCoupling1SGTUMeshClient
224   {
225   public:
226     %extend
227       {
228         static MEDCoupling1SGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
229         {
230           PyObject* pdict=PyDict_New();
231           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
232           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
233           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
234           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
235           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
236           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
237           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
238           if(!iorMesh)
239             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCoupling1SGTUMeshClient.New appears to differ from CORBA reference ! Expecting a 1SGTUMeshCorbaInterface CORBA reference !");
240           char *ior=PyString_AsString(iorMesh);
241           int argc=0;
242           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
243           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
244           SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface::_narrow(meshPtrCpp);
245           if(CORBA::is_nil(meshPtrCppC))
246             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCoupling1SGTUMeshInterface_ptr !");
247           Py_DECREF(pdict);
248           Py_DECREF(iorMesh);
249           MEDCoupling1SGTUMesh *ret=MEDCoupling1SGTUMeshClient::New(meshPtrCppC);
250           return ret;
251         } 
252       }
253   };
254
255   class MEDCoupling1DGTUMeshClient
256   {
257   public:
258     %extend
259       {
260         static MEDCoupling1DGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
261         {
262           PyObject* pdict=PyDict_New();
263           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
264           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
265           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
266           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
267           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
268           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
269           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
270           if(!iorMesh)
271             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCoupling1DGTUMeshClient.New appears to differ from CORBA reference ! Expecting a 1DGTUMeshCorbaInterface CORBA reference !");
272           char *ior=PyString_AsString(iorMesh);
273           int argc=0;
274           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
275           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
276           SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface::_narrow(meshPtrCpp);
277           if(CORBA::is_nil(meshPtrCppC))
278             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCoupling1DGTUMeshInterface_ptr !");
279           Py_DECREF(pdict);
280           Py_DECREF(iorMesh);
281           MEDCoupling1DGTUMesh *ret=MEDCoupling1DGTUMeshClient::New(meshPtrCppC);
282           return ret;
283         } 
284       }
285   };
286
287   class MEDCouplingExtrudedMeshClient
288   {
289   public:
290     %extend
291       {
292         static MEDCouplingExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
293         {
294           PyObject* pdict=PyDict_New();
295           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
296           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
297           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
298           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
299           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
300           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
301           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
302           if(!iorMesh)
303             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingExtrudedMeshClient.New appears to differ from CORBA reference ! Expecting an ExtrudedMeshCorbaInterface CORBA reference !");
304           char *ior=PyString_AsString(iorMesh);
305           int argc=0;
306           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
307           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
308           SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface::_narrow(meshPtrCpp);
309           if(CORBA::is_nil(meshPtrCppC))
310             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingExtrudedMeshInterface_ptr !");
311           Py_DECREF(pdict);
312           Py_DECREF(iorMesh);
313           MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
314           return ret;
315         } 
316       }
317   };
318
319   class MEDCouplingCMeshClient
320   {
321   public:
322     %extend
323       {
324         static MEDCouplingCMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
325         {
326           PyObject* pdict=PyDict_New();
327           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
328           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
329           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
330           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
331           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
332           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
333           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
334           if(!iorMesh)
335             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingCMeshClient.New appears to differ from CORBA reference ! Expecting a CMeshCorbaInterface CORBA reference !");
336           char *ior=PyString_AsString(iorMesh);
337           int argc=0;
338           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
339           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
340           SALOME_MED::MEDCouplingCMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingCMeshCorbaInterface::_narrow(meshPtrCpp);
341           if(CORBA::is_nil(meshPtrCppC))
342             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingCMeshInterface_ptr !");
343           Py_DECREF(pdict);
344           Py_DECREF(iorMesh);
345           MEDCouplingCMesh *ret=MEDCouplingCMeshClient::New(meshPtrCppC);
346           return ret;
347         } 
348       }
349   };
350
351   class MEDCouplingCurveLinearMeshClient
352   {
353   public:
354     %extend
355       {
356         static MEDCouplingCurveLinearMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
357         {
358           PyObject* pdict=PyDict_New();
359           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
360           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
361           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
362           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
363           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
364           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
365           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
366           if(!iorMesh)
367             throw INTERP_KERNEL::Exception("Error : the input parameter of MEDCouplingCurveLinearMeshClient.New appears to differ from CORBA reference ! Expecting a CurveLinearMeshCorbaInterface CORBA reference !");
368           char *ior=PyString_AsString(iorMesh);
369           int argc=0;
370           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
371           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
372           SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var meshPtrCppC=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtrCpp);
373           if(CORBA::is_nil(meshPtrCppC))
374             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingCurveLinearMeshInterface_ptr !");
375           Py_DECREF(pdict);
376           Py_DECREF(iorMesh);
377           MEDCouplingCurveLinearMesh *ret=MEDCouplingCurveLinearMeshClient::New(meshPtrCppC);
378           return ret;
379         } 
380       }
381   };
382
383   class DataArrayDoubleClient
384   {
385   public:
386     %extend
387       {
388         static DataArrayDouble *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
389         {
390           PyObject* pdict=PyDict_New();
391           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
392           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
393           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
394           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
395           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
396           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
397           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
398           if(!iorMesh)
399             throw INTERP_KERNEL::Exception("Error : the input parameter of DataArrayDoubleClient.New appears to differ from CORBA reference ! Expecting a DataArrayDoubleCorbaInterface CORBA reference !");
400           char *ior=PyString_AsString(iorMesh);
401           int argc=0;
402           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
403           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
404           SALOME_MED::DataArrayDoubleCorbaInterface_var meshPtrCppC=SALOME_MED::DataArrayDoubleCorbaInterface::_narrow(meshPtrCpp);
405           if(CORBA::is_nil(meshPtrCppC))
406             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.DataArrayDoubleInterface_ptr ");
407           Py_DECREF(pdict);
408           Py_DECREF(iorMesh);
409           DataArrayDouble *ret=DataArrayDoubleClient::New(meshPtrCppC);
410           return ret;
411         } 
412       }
413   };
414
415   class DataArrayIntClient
416   {
417   public:
418     %extend
419       {
420         static DataArrayInt *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
421         {
422           PyObject* pdict=PyDict_New();
423           PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
424           PyRun_String("import MEDCouplingCorbaServant_idl",Py_single_input,pdict, pdict);
425           PyRun_String("import CORBA",Py_single_input,pdict, pdict);
426           PyRun_String("orbTmp15634=CORBA.ORB_init([''])", Py_single_input,pdict, pdict);
427           PyObject *orbPython=PyDict_GetItemString(pdict,"orbTmp15634");
428           // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
429           PyObject *iorMesh=PyObject_CallMethod(orbPython,(char*)"object_to_string",(char*)"O",meshPtr);
430           if(!iorMesh)
431             throw INTERP_KERNEL::Exception("Error : the input parameter of DataArrayIntClient.New appears to differ from CORBA reference ! Expecting a DataArrayIntCorbaInterface CORBA reference !");
432           char *ior=PyString_AsString(iorMesh);
433           int argc=0;
434           CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
435           CORBA::Object_var meshPtrCpp=orb->string_to_object(ior);
436           SALOME_MED::DataArrayIntCorbaInterface_var meshPtrCppC=SALOME_MED::DataArrayIntCorbaInterface::_narrow(meshPtrCpp);
437           if(CORBA::is_nil(meshPtrCppC))
438             throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.DataArrayIntInterface_ptr !");
439           Py_DECREF(pdict);
440           Py_DECREF(iorMesh);
441           DataArrayInt *ret=DataArrayIntClient::New(meshPtrCppC);
442           return ret;
443         } 
444       }
445   };
446 }
447
448 %pythoncode %{
449 def ParaMEDMEMDataArrayDoubleIadd(self,*args):
450     import _MEDCouplingClient
451     return _MEDCouplingClient.DataArrayDouble____iadd___(self, self, *args)
452 def ParaMEDMEMDataArrayDoubleIsub(self,*args):
453     import _MEDCouplingClient
454     return _MEDCouplingClient.DataArrayDouble____isub___(self, self, *args)
455 def ParaMEDMEMDataArrayDoubleImul(self,*args):
456     import _MEDCouplingClient
457     return _MEDCouplingClient.DataArrayDouble____imul___(self, self, *args)
458 def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
459     import _MEDCouplingClient
460     return _MEDCouplingClient.DataArrayDouble____idiv___(self, self, *args)
461 def ParaMEDMEMDataArrayDoubleIpow(self,*args):
462     import _MEDCouplingClient
463     return _MEDCouplingClient.DataArrayDouble____ipow___(self, self, *args)
464 def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
465     import _MEDCouplingClient
466     return _MEDCouplingClient.MEDCouplingFieldDouble____iadd___(self, self, *args)
467 def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
468     import _MEDCouplingClient
469     return _MEDCouplingClient.MEDCouplingFieldDouble____isub___(self, self, *args)
470 def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
471     import _MEDCouplingClient
472     return _MEDCouplingClient.MEDCouplingFieldDouble____imul___(self, self, *args)
473 def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
474     import _MEDCouplingClient
475     return _MEDCouplingClient.MEDCouplingFieldDouble____idiv___(self, self, *args)
476 def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
477     import _MEDCouplingClient
478     return _MEDCouplingClient.MEDCouplingFieldDouble____ipow___(self, self, *args)
479 def ParaMEDMEMDataArrayIntIadd(self,*args):
480     import _MEDCouplingClient
481     return _MEDCouplingClient.DataArrayInt____iadd___(self, self, *args)
482 def ParaMEDMEMDataArrayIntIsub(self,*args):
483     import _MEDCouplingClient
484     return _MEDCouplingClient.DataArrayInt____isub___(self, self, *args)
485 def ParaMEDMEMDataArrayIntImul(self,*args):
486     import _MEDCouplingClient
487     return _MEDCouplingClient.DataArrayInt____imul___(self, self, *args)
488 def ParaMEDMEMDataArrayIntIdiv(self,*args):
489     import _MEDCouplingClient
490     return _MEDCouplingClient.DataArrayInt____idiv___(self, self, *args)
491 def ParaMEDMEMDataArrayIntImod(self,*args):
492     import _MEDCouplingClient
493     return _MEDCouplingClient.DataArrayInt____imod___(self, self, *args)
494 def ParaMEDMEMDataArrayIntIpow(self,*args):
495     import _MEDCouplingClient
496     return _MEDCouplingClient.DataArrayInt____ipow___(self, self, *args)
497 def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
498     import _MEDCouplingClient
499     return _MEDCouplingClient.DataArrayDoubleTuple____iadd___(self, self, *args)
500 def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
501     import _MEDCouplingClient
502     return _MEDCouplingClient.DataArrayDoubleTuple____isub___(self, self, *args)
503 def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
504     import _MEDCouplingClient
505     return _MEDCouplingClient.DataArrayDoubleTuple____imul___(self, self, *args)
506 def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
507     import _MEDCouplingClient
508     return _MEDCouplingClient.DataArrayDoubleTuple____idiv___(self, self, *args)
509 def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
510     import _MEDCouplingClient
511     return _MEDCouplingClient.DataArrayIntTuple____iadd___(self, self, *args)
512 def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
513     import _MEDCouplingClient
514     return _MEDCouplingClient.DataArrayIntTuple____isub___(self, self, *args)
515 def ParaMEDMEMDataArrayIntTupleImul(self,*args):
516     import _MEDCouplingClient
517     return _MEDCouplingClient.DataArrayIntTuple____imul___(self, self, *args)
518 def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
519     import _MEDCouplingClient
520     return _MEDCouplingClient.DataArrayIntTuple____idiv___(self, self, *args)
521 def ParaMEDMEMDataArrayIntTupleImod(self,*args):
522     import _MEDCouplingClient
523     return _MEDCouplingClient.DataArrayIntTuple____imod___(self, self, *args)
524 %}
525
526 %include "MEDCouplingFinalize.i"