Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / src / MedCorba_Swig / libMedCorba_Swig.i
1 %module libMedCorba_Swig
2
3 %include "libMEDMEM_Swig.i"
4
5 %{
6 #include "MEDMEM_convert.hxx"
7 #include "MEDMEM_Family_i.hxx"
8 #include "MEDMEM_FieldDouble_i.hxx"
9 #include "MEDMEM_Field_i.hxx"
10 #include "MEDMEM_FieldInt_i.hxx"
11 #include "MEDMEM_Group_i.hxx"
12 #include "MEDMEM_Med_i.hxx"
13 #include "MEDMEM_Mesh_i.hxx"
14 #include "MEDMEM_Support_i.hxx"
15 // #include "MEDMEM_SWIG_FieldDouble.hxx"
16 // #include "MEDMEM_SWIG_FieldInt.hxx"
17
18   using namespace MEDMEM;
19   using namespace MED_EN;
20 %}
21
22 /*
23   typemap in and out for Corba Objects (MESH, FIELDDOUBLE, FIELDINT and
24   Support) between C++ and Python
25
26   WARNING (NB) to the user of those typmaps (SWIG wrapping for C++ routines
27   -------------------------------------------------------------------------
28
29   You have to be quite careful about the SWIG version your are currently
30   using, because CORBA pointeur _ptr or _var could be wrapped by SWIG using
31   their reference rather than the pointeur itself (differences detected using
32   SWIG 1.1.x, SWIG 1.3.13 and SWIG 1.3.17)
33 */
34
35 %typemap(python,out) SALOME_MED::MESH_ptr, SALOME_MED::FIELDDOUBLE_ptr,
36   SALOME_MED::FIELDINT_ptr, SALOME_MED::SUPPORT_ptr,
37   const SALOME_MED::MESH_ptr, const SALOME_MED::FIELDDOUBLE_ptr,
38   const SALOME_MED::FIELDINT_ptr, const SALOME_MED::SUPPORT_ptr
39 {
40   MESSAGE("typemap out sur Objet Corba version ptr");
41
42   SCRUTE($1);
43
44   // Get the orb corba python
45
46   PyObject* pdict = PyDict_New();
47   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
48   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
49  
50   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
51                    pdict, pdict);
52  
53   PyObject* orb = PyDict_GetItemString(pdict, "o");
54
55   // Get the orb Corba C++
56
57   int argc = 0;
58   char *xargv = "";
59   char **argv = &xargv;
60   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
61
62   string s =  ORB->object_to_string($1);
63   SCRUTE(s);
64   PyObject * tmp = PyString_FromString(s.c_str());
65   SCRUTE(tmp);
66   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
67   SCRUTE($result);
68 }
69
70 %typemap(python,out) SALOME_MED::MESH_var, SALOME_MED::FIELDDOUBLE_var,
71   SALOME_MED::FIELDINT_var, SALOME_MED::SUPPORT_var,
72   const SALOME_MED::MESH_var, const SALOME_MED::FIELDDOUBLE_var,
73   const SALOME_MED::FIELDINT_var, const SALOME_MED::SUPPORT_var
74 {
75   MESSAGE("typemap out sur Objet Corba version var");
76
77   // Get the orb corba python
78
79   PyObject* pdict = PyDict_New();
80   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
81   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
82  
83   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
84                    pdict, pdict);
85  
86   PyObject* orb = PyDict_GetItemString(pdict, "o");
87
88   // Get the orb Corba C++
89
90   int argc = 0;
91   char *xargv = "";
92   char **argv = &xargv;
93   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
94
95   string s =  ORB->object_to_string(*$1);
96   SCRUTE(s);
97   PyObject * tmp = PyString_FromString(s.c_str());
98   SCRUTE(tmp);
99   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
100   SCRUTE($result);
101 }
102
103 %typemap(python,in) const SALOME_MED::MESH_ptr &, SALOME_MED::MESH_ptr &
104 {
105
106   MESSAGE("typemap in sur Objet Corba MESH avec reference");
107
108   PyObject* pdict = PyDict_New();
109   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
110   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
111  
112   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
113                    pdict, pdict);
114  
115   PyObject* orb = PyDict_GetItemString(pdict, "o");
116
117   // Ask omniORBpy to transform MESH (python Corba) ptr to IOR string
118
119   PyObject* iorMesh
120     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
121  
122   if (iorMesh == Py_None)
123     return NULL;
124   char * s = PyString_AsString(PyObject_Str(iorMesh));
125  
126   // Ask omniORB to convert IOR string to MESH (C++ Corba) ptr
127
128   int argc = 0;
129   char *xargv = "";
130   char **argv = &xargv;
131   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
132   CORBA::Object_var O =  ORB->string_to_object(s);
133   SCRUTE(O);
134   SALOME_MED::MESH_ptr t = SALOME_MED::MESH::_narrow(O);
135
136   $1 = &t;
137   SCRUTE(*$1);
138 }
139
140 %typemap(python,in) const SALOME_MED::FIELDDOUBLE_ptr &,
141                     SALOME_MED::FIELDDOUBLE_ptr &
142 {
143
144   MESSAGE("typemap in sur Objet Corba FIELDDOUBLE avec reference");
145
146   PyObject* pdict = PyDict_New();
147   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
148   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
149  
150   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
151                    pdict, pdict);
152  
153   PyObject* orb = PyDict_GetItemString(pdict, "o");
154
155   // Ask omniORBpy to transform FIELDDOUBLE (python Corba) ptr to IOR string
156
157   PyObject* iorFieldDouble
158     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
159  
160   if (iorFieldDouble == Py_None)
161     return NULL;
162   char * s = PyString_AsString(PyObject_Str(iorFieldDouble));
163  
164   // Ask omniORB to convert IOR string to FIELDDOUBLE (C++ Corba) ptr
165
166   int argc = 0;
167   char *xargv = "";
168   char **argv = &xargv;
169   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
170   CORBA::Object_var O =  ORB->string_to_object(s);
171   SCRUTE(O);
172   SALOME_MED::FIELDDOUBLE_ptr t = SALOME_MED::FIELDDOUBLE::_narrow(O);
173
174   $1 = &t;
175   SCRUTE(*$1);
176 }
177
178 %typemap(python,in) const SALOME_MED::FIELDINT_ptr &,
179                     SALOME_MED::FIELDINT_ptr &
180 {
181
182   MESSAGE("typemap in sur Objet Corba FIELDINT avec reference");
183
184   PyObject* pdict = PyDict_New();
185   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
186   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
187  
188   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
189                    pdict, pdict);
190  
191   PyObject* orb = PyDict_GetItemString(pdict, "o");
192
193   // Ask omniORBpy to transform FIELDINT (python Corba) ptr to IOR string
194
195   PyObject* iorFieldInt
196     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
197  
198   if (iorFieldInt == Py_None)
199     return NULL;
200   char * s = PyString_AsString(PyObject_Str(iorFieldInt));
201  
202   // Ask omniORB to convert IOR string to FIELDINT (C++ Corba) ptr
203
204   int argc = 0;
205   char *xargv = "";
206   char **argv = &xargv;
207   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
208   CORBA::Object_var O =  ORB->string_to_object(s);
209   SCRUTE(O);
210   SALOME_MED::FIELDINT_ptr t = SALOME_MED::FIELDINT::_narrow(O);
211
212   $1 = &t;
213   SCRUTE(*$1);
214 }
215
216 %typemap(python,in) const SALOME_MED::FIELDDOUBLE_ptr,
217                     SALOME_MED::FIELDDOUBLE_ptr
218 {
219
220   MESSAGE("typemap in sur Objet Corba FIELDDOUBLE sans reference");
221
222   PyObject* pdict = PyDict_New();
223   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
224   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
225  
226   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
227                    pdict, pdict);
228  
229   PyObject* orb = PyDict_GetItemString(pdict, "o");
230
231   // Ask omniORBpy to transform FIELDDOUBLE (python Corba) ptr to IOR string
232
233   PyObject* iorFieldDouble
234     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
235  
236   if (iorFieldDouble == Py_None)
237     return NULL;
238   char * s = PyString_AsString(PyObject_Str(iorFieldDouble));
239  
240   // Ask omniORB to convert IOR string to FIELDDOUBLE (C++ Corba) ptr
241
242   int argc = 0;
243   char *xargv = "";
244   char **argv = &xargv;
245   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
246   CORBA::Object_var O =  ORB->string_to_object(s);
247   SCRUTE(O);
248   SALOME_MED::FIELDDOUBLE_ptr t = SALOME_MED::FIELDDOUBLE::_narrow(O);
249
250   $1 = t;
251   SCRUTE($1);
252 }
253
254 %typemap(python,in) const SALOME_MED::FIELDINT_ptr,
255                     SALOME_MED::FIELDINT_ptr
256 {
257
258   MESSAGE("typemap in sur Objet Corba FIELDINT sans reference");
259
260   PyObject* pdict = PyDict_New();
261   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
262   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
263  
264   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
265                    pdict, pdict);
266  
267   PyObject* orb = PyDict_GetItemString(pdict, "o");
268
269   // Ask omniORBpy to transform FIELDINT (python Corba) ptr to IOR string
270
271   PyObject* iorFieldInt
272     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
273  
274   if (iorFieldInt == Py_None)
275     return NULL;
276   char * s = PyString_AsString(PyObject_Str(iorFieldInt));
277  
278   // Ask omniORB to convert IOR string to FIELDINT (C++ Corba) ptr
279
280   int argc = 0;
281   char *xargv = "";
282   char **argv = &xargv;
283   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
284   CORBA::Object_var O =  ORB->string_to_object(s);
285   SCRUTE(O);
286   SALOME_MED::FIELDINT_ptr t = SALOME_MED::FIELDINT::_narrow(O);
287
288   $1 = t;
289   SCRUTE($1);
290 }
291
292 %typemap(python,in) const SALOME_MED::SUPPORT_ptr &, SALOME_MED::SUPPORT_ptr &
293 {
294
295   MESSAGE("typemap in sur Objet Corba SUPPORT avec reference");
296
297   PyObject* pdict = PyDict_New();
298   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
299   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
300  
301   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
302                    pdict, pdict);
303  
304   PyObject* orb = PyDict_GetItemString(pdict, "o");
305
306   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
307
308   PyObject* iorSupport
309     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
310  
311   if (iorSupport == Py_None)
312     return NULL;
313   char * s = PyString_AsString(PyObject_Str(iorSupport));
314  
315   // Ask omniORB to convert IOR string to SUPPORT (C++ Corba) ptr
316
317   int argc = 0;
318   char *xargv = "";
319   char **argv = &xargv;
320   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
321   CORBA::Object_var O =  ORB->string_to_object(s);
322   SCRUTE(O);
323   SALOME_MED::SUPPORT_ptr t = SALOME_MED::SUPPORT::_narrow(O);
324
325   $1 = &t;
326   SCRUTE(*$1);
327 }
328
329 %typemap(python,in) const SALOME_MED::SUPPORT_ptr, SALOME_MED::SUPPORT_ptr
330 {
331
332   MESSAGE("typemap in sur Objet Corba SUPPORT sans reference");
333
334   SCRUTE($input);
335
336   PyObject* pdict = PyDict_New();
337   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
338   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
339  
340   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
341                    pdict, pdict);
342  
343   PyObject* orb = PyDict_GetItemString(pdict, "o");
344
345   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
346
347   PyObject* iorSupport
348     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
349  
350   if (iorSupport == Py_None)
351     return NULL;
352   char * s = PyString_AsString(PyObject_Str(iorSupport));
353  
354   // Ask omniORB to convert IOR string to SUPPORT (C++ Corba) ptr
355
356   int argc = 0;
357   char *xargv = "";
358   char **argv = &xargv;
359   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
360   CORBA::Object_var O =  ORB->string_to_object(s);
361   SCRUTE(O);
362   SALOME_MED::SUPPORT_ptr t = SALOME_MED::SUPPORT::_narrow(O);
363
364   $1 = t;
365   SCRUTE($1);
366 }
367
368 %typemap(python,in) const SALOME_MED::MESH_ptr, SALOME_MED::MESH_ptr
369 {
370
371   MESSAGE("typemap in sur Objet Corba MESH sans reference");
372
373   SCRUTE($input);
374
375   PyObject* pdict = PyDict_New();
376   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
377   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
378  
379   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
380                    pdict, pdict);
381  
382   PyObject* orb = PyDict_GetItemString(pdict, "o");
383
384   // Ask omniORBpy to transform MESH (python Corba) ptr to IOR string
385
386   PyObject* iorMesh
387     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
388  
389   if (iorMesh == Py_None)
390     return NULL;
391   char * s = PyString_AsString(PyObject_Str(iorMesh));
392  
393   // Ask omniORB to convert IOR string to MESH (C++ Corba) ptr
394
395   int argc = 0;
396   char *xargv = "";
397   char **argv = &xargv;
398   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
399   CORBA::Object_var O =  ORB->string_to_object(s);
400   SCRUTE(O);
401   SALOME_MED::MESH_ptr t = SALOME_MED::MESH::_narrow(O);
402
403   $1 = t;
404   SCRUTE($1);
405 }
406
407 %typemap(python,in) const SALOME_MED::FIELDDOUBLE_ptr,
408                     SALOME_MED::FIELDDOUBLE_ptr &
409 {
410
411   MESSAGE("typemap in sur Objet Corba FIELDDOUBLE sans reference");
412
413   SCRUTE($input);
414
415   PyObject* pdict = PyDict_New();
416   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
417   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
418  
419   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
420                    pdict, pdict);
421  
422   PyObject* orb = PyDict_GetItemString(pdict, "o");
423
424   // Ask omniORBpy to transform FIELDDOUBLE (python Corba) ptr to IOR string
425
426   PyObject* iorFieldDouble
427     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
428  
429   if (iorFieldDouble == Py_None)
430     return NULL;
431   char * s = PyString_AsString(PyObject_Str(iorFieldDouble));
432  
433   // Ask omniORB to convert IOR string to FIELDDOUBLE (C++ Corba) ptr
434
435   int argc = 0;
436   char *xargv = "";
437   char **argv = &xargv;
438   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
439   CORBA::Object_var O =  ORB->string_to_object(s);
440   SCRUTE(O);
441   SALOME_MED::FIELDDOUBLE_ptr t = SALOME_MED::FIELDDOUBLE::_narrow(O);
442
443   $1 = t;
444   SCRUTE($1);
445 }
446
447 %typemap(python,in) const SALOME_MED::FIELDINT_ptr,
448                     SALOME_MED::FIELDINT_ptr
449 {
450
451   MESSAGE("typemap in sur Objet Corba FIELDINT sans reference");
452
453   SCRUTE($input);
454
455   PyObject* pdict = PyDict_New();
456   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
457   PyRun_String("import CORBA", Py_single_input, pdict, pdict);
458  
459   PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input,
460                    pdict, pdict);
461  
462   PyObject* orb = PyDict_GetItemString(pdict, "o");
463
464   // Ask omniORBpy to transform FIELDINT (python Corba) ptr to IOR string
465
466   PyObject* iorFieldInt
467     = PyObject_CallMethod(orb, "object_to_string", "O", $input);
468  
469   if (iorFieldInt == Py_None)
470     return NULL;
471   char * s = PyString_AsString(PyObject_Str(iorFieldInt));
472  
473   // Ask omniORB to convert IOR string to FIELDINT (C++ Corba) ptr
474
475   int argc = 0;
476   char *xargv = "";
477   char **argv = &xargv;
478   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
479   CORBA::Object_var O =  ORB->string_to_object(s);
480   SCRUTE(O);
481   SALOME_MED::FIELDINT_ptr t = SALOME_MED::FIELDINT::_narrow(O);
482
483   $1 = t;
484   SCRUTE($1);
485 }
486
487 SALOME_MED::FIELDDOUBLE_ptr createCorbaFieldDouble(SALOME_MED::SUPPORT_ptr,
488                                                    FIELDDOUBLE *,
489                                                    bool ownCppPtr=false);
490
491 SALOME_MED::FIELDINT_ptr createCorbaFieldInt(SALOME_MED::SUPPORT_ptr,
492                                              FIELDINT *,
493                                              bool ownCppPtr=false);
494
495 SALOME_MED::SUPPORT_ptr createCorbaSupport(const SUPPORT *);
496
497 FIELDDOUBLE * createLocalFieldDouble(const int, const int);
498
499 FIELDINT * createLocalFieldInt(const int, const int);
500
501 SALOME_MED::MESH_ptr createCorbaMesh(MESH * mesh);
502
503 %{
504   SALOME_MED::FIELDDOUBLE_ptr createCorbaFieldDouble(SALOME_MED::SUPPORT_ptr mySupportIOR,FIELDDOUBLE * field, bool ownCppPtr=false)
505     {
506       BEGIN_OF("SALOME_MED::FIELDDOUBLE_ptr createCorbaFieldDouble from libMedCorba_Swig");
507
508       SCRUTE(field);
509
510       // MT : Keep the local field name
511       //      field->setName("Corba Double Field");
512
513       field->setDescription("Got From A Local One");
514
515       FIELDDOUBLE_i * fieldimpl = new FIELDDOUBLE_i(field, ownCppPtr);
516
517       SALOME_MED::FIELDDOUBLE_ptr fieldcorba2 = fieldimpl->_this();
518
519       SCRUTE(fieldimpl);
520
521       SCRUTE(fieldcorba2);
522
523       END_OF("SALOME_MED::FIELDDOUBLE_ptr createCorbaFieldDouble from libMedCorba_Swig");
524
525       MESSAGE("Test de tirarge sur le pointeur Corba Field dans le cxx");
526
527       char * name = fieldcorba2->getName();
528
529       SCRUTE(name);
530
531       delete [] name;
532
533      return fieldcorba2;
534     }
535
536   SALOME_MED::FIELDINT_ptr createCorbaFieldInt(SALOME_MED::SUPPORT_ptr mySupportIOR,FIELDINT * field, bool ownCppPtr=false)
537     {
538       BEGIN_OF("SALOME_MED::FIELDINT_ptr createCorbaFieldInt from libMedCorba_Swig");
539
540       SCRUTE(field);
541
542       // MT : Keep the local field name
543       //    field->setName("Corba Integer Field");
544
545       field->setDescription("Got From A Local One");
546
547       FIELDINT_i * fieldimpl = new FIELDINT_i(field, ownCppPtr);
548
549       SALOME_MED::FIELDINT_ptr fieldcorba2 = fieldimpl->_this();
550
551       SCRUTE(fieldimpl);
552
553       SCRUTE(fieldcorba2);
554
555       END_OF("SALOME_MED::FIELDINT_ptr createCorbaFieldInt from libMedCorba_Swig");
556       MESSAGE("Test de tirarge sur le pointeur Corba Field dans le cxx");
557
558       char * name = fieldcorba2->getName();
559
560       SCRUTE(name);
561
562       delete [] name;
563
564       return fieldcorba2;
565     }
566
567   SALOME_MED::SUPPORT_ptr createCorbaSupport(const SUPPORT * const support)
568     {
569       BEGIN_OF("SALOME_MED::SUPPORT_ptr createCorbaSupport from libMedCorba_Swig");
570
571       SCRUTE(support);
572
573       SUPPORT_i * supportimpl = new SUPPORT_i(support);
574
575       SALOME_MED::SUPPORT_ptr supportcorba =
576         supportimpl->POA_SALOME_MED::SUPPORT::_this();
577
578       SCRUTE(supportimpl);
579
580       SCRUTE(supportcorba);
581
582       END_OF("SALOME_MED::SUPPORT_ptr createCorbaSupport from libMedCorba_Swig");
583
584       return supportcorba;
585     }
586
587   SALOME_MED::MESH_ptr createCorbaMesh(MESH * mesh)
588     {
589       BEGIN_OF("SALOME_MED::MESH_ptr createCorbaMesh from libMedCorba_Swig");
590
591       SCRUTE(mesh);
592
593       MESH_i * meshimpl = new MESH_i(mesh);
594
595       SALOME_MED::MESH_ptr meshcorba =
596         meshimpl->POA_SALOME_MED::MESH::_this();
597
598       SCRUTE(meshimpl);
599
600       SCRUTE(meshcorba);
601
602       END_OF("SALOME_MED::MESH_ptr createCorbaMesh from libMedCorba_Swig");
603
604       return meshcorba;
605     }
606
607   FIELDDOUBLE * createLocalFieldDouble(const int NumberOfComponents,
608                                       const int LengthValue)
609     {
610       BEGIN_OF("FIELDDOUBLE createLocalFieldDouble from libMedCorba_Swig");
611
612       SCRUTE(NumberOfComponents);
613       SCRUTE(LengthValue);
614
615       //FIELD<double> * fieldloc =  new FIELD<double>();
616       FIELDDOUBLE * fieldloc =  new FIELDDOUBLE();
617       fieldloc -> allocValue(NumberOfComponents,LengthValue);
618
619       END_OF("FIELDDOUBLE createLocalFieldDouble from libMedCorba_Swig");
620
621       return fieldloc;
622     }
623
624   FIELDINT * createLocalFieldInt(const int NumberOfComponents,
625                                  const int LengthValue)
626     {
627       BEGIN_OF("FIELDINT createLocalFieldInt from libMedCorba_Swig");
628
629       SCRUTE(NumberOfComponents);
630       SCRUTE(LengthValue);
631
632       //FIELD<int> * fieldloc =  new FIELD<int>();
633       FIELDINT * fieldloc =  new FIELDINT();
634       fieldloc -> allocValue(NumberOfComponents,LengthValue);
635
636       END_OF("FIELDDOUBLE createLocalFieldInt from libMedCorba_Swig");
637
638       return fieldloc;
639     }
640 %}