1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
21 %module MEDCouplingClient
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"
40 using namespace MEDCoupling;
43 %include "MEDCouplingCommon.i"
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;
63 #if PY_VERSION_HEX < 0x03050000
65 Py_EncodeLocale(const wchar_t *text, size_t *error_pos)
67 return _Py_wchar2char(text, error_pos);
74 class MEDCouplingFieldDoubleClient
79 static MEDCouplingFieldDouble *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
100 MEDCouplingFieldDouble *ret=MEDCouplingFieldDoubleClient::New(fieldPtrCppC);
106 class MEDCouplingFieldTemplateClient
111 static MEDCouplingFieldTemplate *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
132 MEDCouplingFieldTemplate *ret=MEDCouplingFieldTemplateClient::New(fieldPtrCppC);
138 class MEDCouplingMultiFieldsClient
143 static MEDCouplingMultiFields *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
164 MEDCouplingMultiFields *ret=MEDCouplingMultiFieldsClient::New(fieldPtrCppC);
170 class MEDCouplingFieldOverTimeClient : public MEDCouplingFieldOverTime
173 std::vector<double> getTimeSteps() const;
176 static MEDCouplingFieldOverTimeClient *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
197 MEDCouplingFieldOverTimeClient *ret=MEDCouplingFieldOverTimeClient::New(fieldPtrCppC);
203 class MEDCouplingMeshClient
208 static MEDCouplingMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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))
229 return MEDCouplingUMeshClient::New(meshPtrCppC1);
231 SALOME_MED::MEDCouplingCMeshCorbaInterface_var meshPtrCppC2=SALOME_MED::MEDCouplingCMeshCorbaInterface::_narrow(meshPtrCpp);
232 if(!CORBA::is_nil(meshPtrCppC2))
236 return MEDCouplingCMeshClient::New(meshPtrCppC2);
238 SALOME_MED::MEDCouplingIMeshCorbaInterface_var meshPtrCppC7=SALOME_MED::MEDCouplingIMeshCorbaInterface::_narrow(meshPtrCpp);
239 if(!CORBA::is_nil(meshPtrCppC7))
243 return MEDCouplingIMeshClient::New(meshPtrCppC7);
245 SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var meshPtrCppC3=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtrCpp);
246 if(!CORBA::is_nil(meshPtrCppC3))
250 return MEDCouplingCurveLinearMeshClient::New(meshPtrCppC3);
252 SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_var meshPtrCppC4=SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface::_narrow(meshPtrCpp);
253 if(!CORBA::is_nil(meshPtrCppC4))
257 return MEDCoupling1SGTUMeshClient::New(meshPtrCppC4);
259 SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_var meshPtrCppC5=SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface::_narrow(meshPtrCpp);
260 if(!CORBA::is_nil(meshPtrCppC5))
264 return MEDCoupling1DGTUMeshClient::New(meshPtrCppC5);
266 SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_var meshPtrCppC6=SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface::_narrow(meshPtrCpp);
267 if(!CORBA::is_nil(meshPtrCppC6))
271 return MEDCouplingExtrudedMeshClient::New(meshPtrCppC6);
273 throw INTERP_KERNEL::Exception("Error input corba pointer is not a managed mesh type !");
278 class MEDCouplingUMeshClient
283 static MEDCouplingUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
304 MEDCouplingUMesh *ret=MEDCouplingUMeshClient::New(meshPtrCppC);
310 class MEDCoupling1SGTUMeshClient
315 static MEDCoupling1SGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
336 MEDCoupling1SGTUMesh *ret=MEDCoupling1SGTUMeshClient::New(meshPtrCppC);
342 class MEDCoupling1DGTUMeshClient
347 static MEDCoupling1DGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
368 MEDCoupling1DGTUMesh *ret=MEDCoupling1DGTUMeshClient::New(meshPtrCppC);
374 class MEDCouplingExtrudedMeshClient
379 static MEDCouplingMappedExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
400 MEDCouplingMappedExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
406 class MEDCouplingCMeshClient
411 static MEDCouplingCMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
432 MEDCouplingCMesh *ret=MEDCouplingCMeshClient::New(meshPtrCppC);
438 class MEDCouplingIMeshClient
443 static MEDCouplingIMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
464 MEDCouplingIMesh *ret=MEDCouplingIMeshClient::New(meshPtrCppC);
470 class MEDCouplingCurveLinearMeshClient
475 static MEDCouplingCurveLinearMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
496 MEDCouplingCurveLinearMesh *ret=MEDCouplingCurveLinearMeshClient::New(meshPtrCppC);
502 class DataArrayDoubleClient
507 static DataArrayDouble *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 ");
528 DataArrayDouble *ret=DataArrayDoubleClient::New(meshPtrCppC);
534 class DataArrayIntClient
539 static DataArrayInt *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
560 DataArrayInt *ret=DataArrayIntClient::New(meshPtrCppC);
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)
663 %include "MEDCouplingFinalize.i"