1 // Copyright (C) 2007-2013 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.
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 "MEDCouplingCurveLinearMeshClient.hxx"
34 #include "DataArrayDoubleClient.hxx"
35 #include "DataArrayIntClient.hxx"
39 using namespace ParaMEDMEM;
42 %include "MEDCouplingCommon.i"
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;
62 class MEDCouplingFieldDoubleClient
67 static MEDCouplingFieldDouble *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
88 MEDCouplingFieldDouble *ret=MEDCouplingFieldDoubleClient::New(fieldPtrCppC);
94 class MEDCouplingFieldTemplateClient
99 static MEDCouplingFieldTemplate *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
120 MEDCouplingFieldTemplate *ret=MEDCouplingFieldTemplateClient::New(fieldPtrCppC);
126 class MEDCouplingMultiFieldsClient
131 static MEDCouplingMultiFields *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
152 MEDCouplingMultiFields *ret=MEDCouplingMultiFieldsClient::New(fieldPtrCppC);
158 class MEDCouplingFieldOverTimeClient : public MEDCouplingFieldOverTime
161 std::vector<double> getTimeSteps() const;
164 static MEDCouplingFieldOverTimeClient *New(PyObject *fieldPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
185 MEDCouplingFieldOverTimeClient *ret=MEDCouplingFieldOverTimeClient::New(fieldPtrCppC);
191 class MEDCouplingMeshClient
196 static MEDCouplingMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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))
217 return MEDCouplingUMeshClient::New(meshPtrCppC1);
219 SALOME_MED::MEDCouplingCMeshCorbaInterface_var meshPtrCppC2=SALOME_MED::MEDCouplingCMeshCorbaInterface::_narrow(meshPtrCpp);
220 if(!CORBA::is_nil(meshPtrCppC2))
224 return MEDCouplingCMeshClient::New(meshPtrCppC2);
226 SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var meshPtrCppC3=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtrCpp);
227 if(!CORBA::is_nil(meshPtrCppC3))
231 return MEDCouplingCurveLinearMeshClient::New(meshPtrCppC3);
233 SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_var meshPtrCppC4=SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface::_narrow(meshPtrCpp);
234 if(!CORBA::is_nil(meshPtrCppC4))
238 return MEDCoupling1SGTUMeshClient::New(meshPtrCppC4);
240 SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_var meshPtrCppC5=SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface::_narrow(meshPtrCpp);
241 if(!CORBA::is_nil(meshPtrCppC5))
245 return MEDCoupling1DGTUMeshClient::New(meshPtrCppC5);
247 SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_var meshPtrCppC6=SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface::_narrow(meshPtrCpp);
248 if(!CORBA::is_nil(meshPtrCppC6))
252 return MEDCouplingExtrudedMeshClient::New(meshPtrCppC6);
254 throw INTERP_KERNEL::Exception("Error input corba pointer is not a managed mesh type !");
259 class MEDCouplingUMeshClient
264 static MEDCouplingUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
285 MEDCouplingUMesh *ret=MEDCouplingUMeshClient::New(meshPtrCppC);
291 class MEDCoupling1SGTUMeshClient
296 static MEDCoupling1SGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
317 MEDCoupling1SGTUMesh *ret=MEDCoupling1SGTUMeshClient::New(meshPtrCppC);
323 class MEDCoupling1DGTUMeshClient
328 static MEDCoupling1DGTUMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
349 MEDCoupling1DGTUMesh *ret=MEDCoupling1DGTUMeshClient::New(meshPtrCppC);
355 class MEDCouplingExtrudedMeshClient
360 static MEDCouplingExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
381 MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
387 class MEDCouplingCMeshClient
392 static MEDCouplingCMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
413 MEDCouplingCMesh *ret=MEDCouplingCMeshClient::New(meshPtrCppC);
419 class MEDCouplingCurveLinearMeshClient
424 static MEDCouplingCurveLinearMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
445 MEDCouplingCurveLinearMesh *ret=MEDCouplingCurveLinearMeshClient::New(meshPtrCppC);
451 class DataArrayDoubleClient
456 static DataArrayDouble *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 ");
477 DataArrayDouble *ret=DataArrayDoubleClient::New(meshPtrCppC);
483 class DataArrayIntClient
488 static DataArrayInt *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
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);
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);
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 !");
509 DataArrayInt *ret=DataArrayIntClient::New(meshPtrCppC);
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)
594 %include "MEDCouplingFinalize.i"