]> SALOME platform Git repositories - modules/med.git/blob - idl/MED.idl
Salome HOME
Building a version which will be tagged PreV2_0_0 working with KERNEL V1_4_0.
[modules/med.git] / idl / MED.idl
1 // File: MED.idl
2 // Project: SALOME
3 // Copyright : CEA/DEN/DMSS/LGLS
4 // $Header$
5 /*! 
6 This file contains the main IDL definitions of the %MED component in %SALOME application.
7 */
8 #ifndef MED_IDL
9 #define MED_IDL
10 /*!
11  \defgroup MED SALOME MED component
12
13  This component is dedicated to the mounting in memory of a .med file. some
14  services of that component store CORBA objects (MED, MESH, FIELD) in the
15  study and/or give a direct access to those objects.
16 */
17
18 #include "SALOME_Exception.idl"
19 #include "SALOME_Component.idl"
20 #include "SALOMEDS.idl"
21
22 module SALOME_MED {
23   /*!
24     An array of long
25   */
26   typedef sequence<long> long_array;
27   /*!
28     An array of double
29   */
30   typedef sequence<double> double_array;
31   /*!
32     An array of string
33   */
34   typedef sequence<string> string_array;
35   /*!
36     An array of boolean
37   */
38   typedef sequence<boolean> boolean_array;
39
40 /*! \ingroup MED
41 This package contains a set of interfaces used for %SALOME %MED component.
42 */ 
43
44
45   interface FIELD;
46   interface FAMILY;
47   interface GROUP;
48   interface MESH;
49   interface SUPPORT;
50
51 /*! 
52 This enumeration contains a set of elements defining the type of geometrical elements which constitue 
53 a %Mesh.
54 */
55   typedef long medGeometryElement;
56   const medGeometryElement MED_NONE = 0;
57   const medGeometryElement MED_POINT1 = 1;
58   const medGeometryElement MED_SEG2 = 102;
59   const medGeometryElement MED_SEG3 = 103;
60   const medGeometryElement MED_TRIA3 = 203;
61   const medGeometryElement MED_QUAD4 = 204;
62   const medGeometryElement MED_TRIA6 = 206;
63   const medGeometryElement MED_QUAD8 = 208;
64   const medGeometryElement MED_TETRA4 = 304;
65   const medGeometryElement MED_PYRA5 = 305;
66   const medGeometryElement MED_PENTA6 = 306;
67   const medGeometryElement MED_HEXA8 = 308;
68   const medGeometryElement MED_TETRA10 = 310;
69   const medGeometryElement MED_PYRA13 = 313;
70   const medGeometryElement MED_PENTA15 = 315;
71   const medGeometryElement MED_HEXA20 = 320;
72   const medGeometryElement MED_ALL_ELEMENTS = 999;
73
74
75 /*! 
76 This enumeration contains a set of elements defining the structural elements (entities) which constitue 
77 a %Mesh.
78 */
79   typedef long medEntityMesh;
80   const medEntityMesh MED_CELL = 0;
81   const medEntityMesh MED_FACE = 1;
82   const medEntityMesh MED_EDGE = 2;
83   const medEntityMesh MED_NODE = 3;
84   const medEntityMesh MED_ALL_ENTITIES = 4;
85
86 /*! 
87 This enumeration contains a set of modes to store data in an array.
88 For example an array of coordinates in 3D; tow storage may be considered:
89
90  - X1,Y1,Z1,X2,Y2,Z2,...,Xn,Yn,Zn if MED_FULL_INTERLACE
91  - X1,X2,...,Xn,Y1,Y2,...,Yn,Z1,Z2,...,Zn if MED_NO_INTERLACE
92 */
93   typedef long medModeSwitch;
94   const medModeSwitch MED_FULL_INTERLACE = 0;
95   const medModeSwitch MED_NO_INTERLACE = 1;
96
97 /*! 
98 This enumeration contains a set of elements defining the type of connectivity.
99 */
100   typedef long medConnectivity;
101   const medConnectivity MED_NODAL = 0;
102   const medConnectivity MED_DESCENDING = 1;
103
104
105 /*! 
106    enumeration contains a set of elements defining the type of driver.
107 */
108     typedef long medDriverTypes;
109     /*!<This driver is used for reading into memory of the mesh from %MED file.*/
110     const medDriverTypes MED_DRIVER  = 0;
111     const medDriverTypes VTK_DRIVER = 1;
112     const medDriverTypes NO_DRIVER = 2;
113
114   /*!
115     An array of %medGeometryElement
116   */
117   typedef sequence<medGeometryElement> medGeometryElement_array;
118
119   /*!
120     An array of %FAMILY
121   */
122   typedef sequence<FAMILY> Family_array;
123
124   /*!
125     An array of %GROUP
126   */
127   typedef sequence<GROUP> Group_array;
128   
129   // ----------------------
130   // mesh interface
131   // ----------------------
132
133   interface MESH {
134     // Index range begins from 1
135
136     // General Informations
137     //---------------------
138
139     /*!
140       Returns the name of the mesh .
141     */
142     string getName() raises (SALOME::SALOME_Exception);
143     
144     /*!
145       Returns space dimension.
146     */
147     long getSpaceDimension() raises (SALOME::SALOME_Exception);
148
149     /*!
150       Returns mesh dimension.
151       
152       Example :
153       - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3D
154       - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2D
155       - we have both MED_SEG2 and MED_TRIA3 in MED_CELL : MeshDimension = 2D
156     */
157     long getMeshDimension() raises (SALOME::SALOME_Exception);
158
159     /*!
160         Pour Alliances
161     */
162     boolean getIsAGrid() raises (SALOME::SALOME_Exception);
163
164     /*!
165         Pour Alliances
166     */
167     boolean existConnectivity (in medConnectivity mode,
168                                in medEntityMesh entity)
169                                raises (SALOME::SALOME_Exception);
170
171     // Coordinates
172     //------------
173
174     /*!
175       Returns coordinate system :
176       - "CARTESIAN"
177       - "CYLINDRICAL"
178       - "SPHERICAL"
179     */
180     string getCoordinatesSystem() raises (SALOME::SALOME_Exception); 
181
182     /*!
183       Returns the number of nodes defined in the mesh.
184     */
185     long getNumberOfNodes() raises (SALOME::SALOME_Exception);
186
187     /*!
188       Returns an array of coordinates stored in any type
189     */
190     SALOME_MED::double_array getCoordinates(in medModeSwitch typeSwitch)
191       raises (SALOME::SALOME_Exception);
192
193     /*!
194      Returns coordinate  n° Number on axis n° Axis 
195     */
196     double getCoordinate(in long Number, in long Axis)
197       raises (SALOME::SALOME_Exception);
198       
199
200     /*!
201       Returns an array containing the names of coordinates.
202       
203       Example :
204       - x,y,z
205       - r,teta,phi
206       - ...
207       
208       It could be empty.
209     */
210     SALOME_MED::string_array getCoordinatesNames()
211       raises (SALOME::SALOME_Exception);
212
213     /*!
214       Returns an array containing the units of coordinates (cm, m, mm, ...)
215
216       It could be empty. By defult IS is used (meter).
217     */
218     SALOME_MED::string_array getCoordinatesUnits()
219       raises (SALOME::SALOME_Exception);
220
221     /*!
222       Returns the %SUPPORT containing the boundary elements
223       of the mesh.
224     */
225
226     SUPPORT getBoundaryElements(in medEntityMesh Entity)
227       raises (SALOME::SALOME_Exception);
228
229     /*!
230       Returns the %SUPPORT containing the boundary elements
231       of the support mySupport3D.
232     */
233     SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
234
235     SALOME_MED::long_array getGlobalNumberingIndex(in medEntityMesh entity) ;
236
237     struct coordinateInfos
238     {
239         string                  coordSystem;
240         SALOME_MED::string_array   coordNames;
241         SALOME_MED::string_array   coordUnits;
242     };
243     coordinateInfos getCoordGlobal()    raises (SALOME::SALOME_Exception);
244
245
246
247     // Connectivity
248     // ------------
249
250     /*!
251       Returns the number of defferent %medGeometryElement types existing 
252       in the specified entity.
253
254       \note 
255       Not implemented for MED_ALL_ENTITIES.
256     */
257     long getNumberOfTypes(in medEntityMesh entity)
258       raises (SALOME::SALOME_Exception);
259
260     /*!
261       Returns an array of all %medGeometryElement types existing 
262       in the mesh.
263
264       \note 
265        Not implemented for MED_ALL_ENTITIES.
266     */
267     medGeometryElement_array getTypes(in medEntityMesh entity)
268       raises (SALOME::SALOME_Exception);
269
270     /*!
271       Returns the number of elements of type %medGeometryElement.
272
273       Note : 
274       - Implemented for MED_ALL_ELEMENTS
275       - Not implemented for MED_ALL_ENTITIES
276     */
277     long getNumberOfElements(in medEntityMesh entity,
278                              in medGeometryElement geomElement)
279       raises (SALOME::SALOME_Exception);
280
281     /*!
282       Give, in full or no interlace mode (for nodal connectivity),
283       descending or nodal connectivity.
284
285       You must give a %medEntityMesh (ie:MED_EDGE) and a 
286       %medGeometryElement (ie:MED_SEG3).
287     */
288     SALOME_MED::long_array getConnectivity(in medModeSwitch typeSwitch,
289                                         in medConnectivity mode,
290                                         in medEntityMesh entity,
291                                         in medGeometryElement geomElement)
292       raises (SALOME::SALOME_Exception);
293
294     /*!
295       Give morse index array to use with 
296       getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS).
297
298       Each value give start index for corresponding entity in 
299       connectivity array.
300
301       Example : i-th element, j-th node of it :
302       - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
303       - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
304     */
305     SALOME_MED::long_array getConnectivityIndex(in medConnectivity mode,
306                                              in medEntityMesh entity)
307       raises (SALOME::SALOME_Exception);
308
309     /*!
310       Gets a global number of the element which have the same connectivity as the  
311       connectivity argument.
312     */
313     long getElementNumber(in medConnectivity mode, 
314                           in medEntityMesh entity, 
315                           in medGeometryElement type, 
316                           in SALOME_MED::long_array connectivity) 
317       raises (SALOME::SALOME_Exception);
318
319     medGeometryElement   getElementType (in  medEntityMesh entity, 
320                                        in long number)
321       raises (SALOME::SALOME_Exception);
322
323     /*!
324       Returns a reverse connectivity to MED_CELL.
325
326       If mode=MED_NODAL, the array contains, for each node, all cells 
327       arround it.
328
329       If mode=MED_DESCENDING, the array contains, for each face (or edge), 
330       the 2 cells of each side. First is cell which face normal is outgoing.
331     */
332     SALOME_MED::long_array getReverseConnectivity(in medConnectivity mode)
333       raises (SALOME::SALOME_Exception);
334
335     /*!
336       Give index array to use with getReverseConnectivity(MED_NODAL).
337
338       This method is not used with MED_DESCENDING mode, 
339       because we have allways two cells.
340
341       See getConnectivityIndex for details.
342     */
343     SALOME_MED::long_array getReverseConnectivityIndex(in medConnectivity mode)
344       raises (SALOME::SALOME_Exception);
345
346     struct connectivityInfos
347     {
348         long                     numberOfNodes;
349         medGeometryElement_array meshTypes;
350         SALOME_MED::long_array      numberOfElements;
351     };
352     connectivityInfos getConnectGlobal(in medEntityMesh entity) 
353     raises (SALOME::SALOME_Exception);
354
355     // Families and Groups
356     // -------------------
357
358     /*!
359       Returns the number of all families.
360     */
361     long getNumberOfFamilies(in medEntityMesh entity)
362       raises (SALOME::SALOME_Exception);
363
364     /*!
365       Returns the number of all groups.
366     */
367     long getNumberOfGroups(in medEntityMesh entity)
368       raises (SALOME::SALOME_Exception);
369
370     /*!
371       Returns an array of all families.
372     */
373     Family_array getFamilies(in medEntityMesh entity)
374       raises (SALOME::SALOME_Exception);
375
376     /*!
377       Returns the reference to i-th family.
378
379       \note 
380       i is bounded by 1 and NumberOfFamilies.
381     */
382     FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
383       raises (SALOME::SALOME_Exception);
384
385     /*!
386       Returns an array of all groups.
387     */
388     Group_array getGroups(in medEntityMesh entity)
389       raises (SALOME::SALOME_Exception);
390
391     /*!
392       Returns the reference to i-th group.
393
394       \note 
395      i is bounded by 1 and NumberOfGroups.
396     */
397     GROUP getGroup(in medEntityMesh entity,in long groupNumber)
398       raises (SALOME::SALOME_Exception);
399
400     // Others
401     // ------
402
403     /*!
404       Returns a field on mySupport containing volume.
405
406       \note 
407       mySupport must be on MED_CELL entity and MeshDimension must be 3D.
408     */
409     FIELD getVolume(in SUPPORT mySupport)
410       raises (SALOME::SALOME_Exception);
411
412     /*!
413       Returns a field on mySupport containing area.
414
415       \note 
416       mySupport must be on MED_FACE entity.
417     */
418     FIELD getArea(in SUPPORT mySupport)
419       raises (SALOME::SALOME_Exception);
420
421     /*!
422       Returns a field on mySupport containing length.
423
424     \note
425      mySupport must be on MED_EDGE entity.
426     */
427     FIELD getLength(in SUPPORT mySupport)
428       raises (SALOME::SALOME_Exception);
429
430     /*!
431       Returns a field on mySupport containing normal.
432
433       \note
434       mySupport must be on MED_FACE entity if MeshDimension and 
435       SpaceDimension=3D and on MED_EDGE if MeshDimension and SpaceDimension=2D.
436     */
437     FIELD getNormal(in SUPPORT mySupport)
438       raises (SALOME::SALOME_Exception);
439
440     /*!
441       Returns a field on mySupport containing barycenter.
442     */
443     FIELD getBarycenter(in SUPPORT mySupport)
444       raises (SALOME::SALOME_Exception);
445
446     /*
447       Returns a field on mySupport containing neighbourhood.
448     */
449     // FIELD getNeighbourhood(in SUPPORT mySupport)
450     // raises (SALOME::SALOME_Exception);
451
452     // Read & Write
453     // -----------
454
455     /*!
456       Adds the Mesh in the StudyManager.
457     */
458     void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
459       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
460
461     //                          Add a MED/VTK/... driver
462     //                          Multiple drivers can be added whatever the type
463     long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName) 
464                                         raises (SALOME::SALOME_Exception);
465     //                          Remove a driver
466     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
467
468    //
469     void read          (in long i)  raises (SALOME::SALOME_Exception);
470     void write         (in long i, in string driverMeshName)  
471                                     raises (SALOME::SALOME_Exception);
472   
473 /*!
474 Internal Corba method. 
475 */ 
476     long getCorbaIndex()        raises (SALOME::SALOME_Exception);
477     struct meshInfos
478     {
479            string name ;
480            long spaceDimension ;
481            long meshDimension;
482            long numberOfNodes ;
483            boolean isAGrid;
484            Family_array famNode;
485            Family_array famEdge;
486            Family_array famFace;
487            Family_array famCell;
488            Group_array  groupNode;
489            Group_array  groupEdge;
490            Group_array  groupFace;
491            Group_array  groupCell;
492     };
493     meshInfos getMeshGlobal()           raises (SALOME::SALOME_Exception);
494   };
495
496   
497   // ----------------------
498   // Support interface
499   // ----------------------
500   
501   interface SUPPORT {
502     
503     /*!
504       Returns the name of the support.
505     */
506     string getName() raises (SALOME::SALOME_Exception);
507
508     /*!
509       Returns the description of the support.
510     */
511     string getDescription() raises (SALOME::SALOME_Exception);
512
513     /*!
514       Returns a reference to the mesh.
515     */
516     MESH getMesh() raises (SALOME::SALOME_Exception);
517
518     /*!
519       Returns the type of %medEntityMesh used by the support. 
520
521       \note 
522       A support deals only with one entity's type 
523       (for example : MED_FACE or MED_NODE)
524     */
525     medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
526
527     /*!
528       Returns True if all elements of this entity are
529       engaged, False otherwise.
530
531       If True, you must use mesh reference (getMesh) to get more information.
532     */
533     boolean isOnAllElements() raises (SALOME::SALOME_Exception);
534
535     /*!
536       If the method %isOnAllElements() returns False, this method 
537      returns the number of elements in the support.
538
539       Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements 
540       in entity of support.
541
542       \note 
543       If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement
544       type.
545     */
546     long getNumberOfElements(in medGeometryElement geomElement)
547       raises (SALOME::SALOME_Exception);
548
549      long  getNumberOfTypes() raises (SALOME::SALOME_Exception);
550     /*!
551       If isOnAllElements is False, returns an array of %medGeometryElement
552       types used by the support.
553
554       %medEntityMesh is given by getEntity.
555     */
556     medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
557
558
559     /*!
560       If the method %isOnAllElements() returns False, this method returns an array which 
561      contains all numbers of given %medGeometryElement.
562
563       Numbering is global, ie numbers are bounded by 1 and 
564       MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and 
565       MESH::getNumberOfElement(entity,geomElement).
566
567       \note
568       If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement type.
569     */
570     SALOME_MED::long_array getNumber(in medGeometryElement geomElement)
571       raises (SALOME::SALOME_Exception);
572
573     /*!
574       If the method %isOnAllElements() returns False, this method returns the index 
575       of element number.
576       
577       Use it with getNumber(MED_ALL_ELEMENTS). 
578       
579       \note 
580        See the method %getConnectivityIndex for more details.
581     */
582     SALOME_MED::long_array getNumberIndex()
583       raises (SALOME::SALOME_Exception);
584     /*!
585       Returns the number of Gauss points for this %medGeometryElement.
586
587       \note 
588       - Not defined if %SUPPORT is on MED_NODE.
589       - Not defined for MED_ALL_ELEMENTS %medGeometryElement type.
590      */
591     long getNumberOfGaussPoint(in medGeometryElement geomElement)
592                                 raises (SALOME::SALOME_Exception);
593
594     SALOME_MED::long_array getNumbersOfGaussPoint()
595                                 raises (SALOME::SALOME_Exception);
596
597     void getBoundaryElements()
598                                         raises (SALOME::SALOME_Exception);
599 /*!
600 Internal Corba method. 
601 */    
602     long getCorbaIndex()                raises (SALOME::SALOME_Exception);
603     struct supportInfos
604     {
605            string        name;
606            string        description;
607            boolean       isOnAllElements;
608            medEntityMesh entity;
609            long          numberOfGeometricType; 
610            medGeometryElement_array types;
611            SALOME_MED::long_array nbEltTypes; 
612     };
613     supportInfos getSupportGlobal()             raises (SALOME::SALOME_Exception);
614
615   };
616
617
618   //-----------------
619   // Family interface
620   //-----------------
621
622   interface FAMILY : SUPPORT 
623     {
624
625       /*!
626         Returns Family identifier (Identifier
627         of the family in the mesh). 
628
629         \note
630       There is precisely only one indentifier for each family.
631       */
632       long getIdentifier() raises (SALOME::SALOME_Exception);
633
634       /*!
635         Returns number of attributes.
636       */
637       long getNumberOfAttributes() raises (SALOME::SALOME_Exception);
638
639       /*!
640         Returns an array of all attributes' identifiers.
641         There is one for each attribute.
642       */
643       SALOME_MED::long_array getAttributesIdentifiers() 
644         raises (SALOME::SALOME_Exception);
645
646       /*!
647         Returns identifier of i-th attribute.
648
649         \note 
650       i is bounded by 1 and NumberOfAttributes.
651       */
652       long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
653
654       /*!
655         Returns an array of all values of the attributes .
656         There is one value for each attribute.
657       */
658       SALOME_MED::long_array getAttributesValues() 
659         raises (SALOME::SALOME_Exception);
660
661       /*!
662         Returns the value of i-th attribute.
663
664         \note 
665       i is bounded by 1 and NumberOfAttributes.
666       */
667       long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
668
669       /*!
670         Returns an array of all descriptions of the attributes .
671         There is one description for each attribute.
672       */
673       SALOME_MED::string_array getAttributesDescriptions() 
674         raises (SALOME::SALOME_Exception);
675
676       /*!
677         Returns the description of i-th attribute.
678
679         \note 
680       i is bounded by 1 and NumberOfAttributes.
681       */
682       string getAttributeDescription(in long i) 
683         raises (SALOME::SALOME_Exception);
684
685      /*!
686         Returns the number of groups the family belongs to.
687       */
688       long getNumberOfGroups()
689         raises (SALOME::SALOME_Exception);
690
691       /*!
692         Returns an array of names of groups the family belongs to .
693         There is one name for each group.
694       */
695       SALOME_MED::string_array getGroupsNames() 
696         raises (SALOME::SALOME_Exception);
697
698       /*!
699         Returns the name of i-th group.
700
701         \note 
702       i is bounded by 1 and NumberOfAttributes.
703       */
704       string getGroupName(in long i) 
705         raises (SALOME::SALOME_Exception);
706
707
708     };
709
710
711   //----------------
712   // Group interface
713   //----------------
714   interface GROUP : SUPPORT 
715     {
716
717       /*!
718         Returns the number of families in this group.
719       */
720       long getNumberOfFamilies() raises (SALOME::SALOME_Exception);
721
722       /*!
723         Returns an array of all families.
724       */
725       Family_array getFamilies() raises (SALOME::SALOME_Exception);
726
727       /*!
728         Returns a reference to the i-th family.
729
730         \note 
731       i is bounded by 1 and NumberOfFamilies.
732       */
733       FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
734
735     };
736
737
738   //----------------
739   // Field interface
740   //----------------
741
742   interface FIELD 
743     {
744
745       /*!
746         Returns the field name.
747       */
748       string getName() raises (SALOME::SALOME_Exception);
749
750       /*!
751         Returns the field description.
752       */
753       string getDescription() raises (SALOME::SALOME_Exception);
754
755       /*!
756         Returns a reference to the support
757         on which the field is defined.
758       */
759       SUPPORT getSupport() raises (SALOME::SALOME_Exception);
760
761       /*!
762         Returns the number of field's components.
763       */
764       long getNumberOfComponents() raises (SALOME::SALOME_Exception);
765
766       /*!
767         Returns an array containing components names.
768       */
769       SALOME_MED::string_array getComponentsNames() 
770         raises (SALOME::SALOME_Exception);
771
772       /*!
773         Returns the name of i-th component.
774
775         \note  
776         - i is bounded by 1 and NumberOfComponents.
777         - Name is mandatory for each field's component.
778       */
779       string getComponentName(in long i) raises (SALOME::SALOME_Exception);
780
781       /*!
782         Returns an array containing components units.
783       */
784       SALOME_MED::string_array getComponentsUnits()
785         raises (SALOME::SALOME_Exception);
786
787       /*!
788         Returns the unit of i-th component.
789
790         \note 
791       i is bounded by 1 and NumberOfComponents.
792       */
793       string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
794
795       /*!
796         Returns the iteration number.
797       */
798       long getIterationNumber() raises (SALOME::SALOME_Exception);
799
800       /*!
801         Returns time for this iteration.
802       */
803       double getTime() raises (SALOME::SALOME_Exception);
804
805       /*!
806         Returns order number use for 
807         internal step in this iteration.
808       */
809       long getOrderNumber() raises (SALOME::SALOME_Exception);
810
811       // Read & Write
812       // -----------
813       
814       long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName) 
815         raises (SALOME::SALOME_Exception);
816       
817       /*!
818      Removes a driver
819      */
820       void rmDriver (in long i)
821         raises (SALOME::SALOME_Exception);
822       
823       //
824       void read (in long i)
825         raises (SALOME::SALOME_Exception);
826
827       /*!
828         Writes a field.
829       */
830       void write (in long i, in string driverFieldName)  
831         raises (SALOME::SALOME_Exception);
832       
833       /*!
834         Adds the Field in the StudyManager.
835       */
836       void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
837         raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
838
839 /*!
840 Internal Corba method.
841 */
842       long getCorbaIndex()
843         raises (SALOME::SALOME_Exception);
844
845     };
846
847
848   interface FIELDDOUBLE : FIELD {
849
850     /*!
851       Returns an array of values of the field  
852     */
853     SALOME_MED::double_array getValue(in medModeSwitch mode)
854       raises (SALOME::SALOME_Exception);
855   };
856
857   interface FIELDINT : FIELD {
858
859     /*!
860       Returns an array of values of the field  
861     */
862     SALOME_MED::long_array getValue(in medModeSwitch mode)
863       raises (SALOME::SALOME_Exception);
864
865   };
866
867   // MED interface
868
869   interface MED {
870     /*!
871       returns the number of meshes in the %MED object.
872      */
873     long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);       
874     /*!
875       returns the number of fields in the %MED object.
876      */
877     long                   getNumberOfFields () raises (SALOME::SALOME_Exception);
878     /*!
879       returns an array which contains the name of each meshes in the %MED object.
880      */
881     SALOME_MED::string_array  getMeshNames      () raises (SALOME::SALOME_Exception);
882     /*!
883       returns an array which contains the name of each fields in the %MED object.
884      */
885     SALOME_MED::string_array  getFieldNames     () raises (SALOME::SALOME_Exception);
886     /*!
887       giving a mesh name, it returns the corresponding %MESH pointer.
888      */
889     MESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
890     /*!
891       giving a %FIELD pointer, it returns the corresponding %MESH pointer of the mesh
892       on which the field lies.
893      */
894     MESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
895     /*!
896       giving a field name, it returns the number of iteration in the corresponding %FIELD object.
897      */
898     long getFieldNumberOfIteration(in string fieldName) raises (SALOME::SALOME_Exception);
899     /*!
900       giving a field name and an integer %i, it returns a couple of integers: the time iteration and
901       the order number of the %i^th iteration of the corresponding %FIELD object.
902      */
903     SALOME_MED::long_array  getFieldIteration(in string fieldName, in long i) raises (SALOME::SALOME_Exception);
904     /*!
905       giving a field name, a time iteration and an order number, it returns the corresponding %FIELD oject.
906      */
907     FIELD                  getField          ( in string fieldName, 
908                                                in long pasTemps,
909                                                in long numOrdre )    raises (SALOME::SALOME_Exception);
910
911
912     // Add a MED/VTK/... driver to a MED'GEN' object to 
913     // be able to read/write files preserving  meshes<-->fields association
914     // Multiple drivers can be added whatever the type.
915     // The access point in the <long> returned
916     long addDriver     (in medDriverTypes driverType, in string  fileName) 
917                                         raises (SALOME::SALOME_Exception);
918     /*! 
919    Removes the driver
920     */ 
921     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
922     /*! 
923     Reads the structure of the %MED file
924     */
925     void readFileStruct(in long i)  raises (SALOME::SALOME_Exception);
926     void writeFrom     (in long i)  raises (SALOME::SALOME_Exception);
927     void write         (in long i)  raises (SALOME::SALOME_Exception);
928
929     void addMesh  (in MESH   ptrMesh   ) raises (SALOME::SALOME_Exception);
930     void addField (in FIELD  ptrField  ) raises (SALOME::SALOME_Exception);
931     
932     void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
933   };
934 };
935
936 #endif /* MED_IDL */