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