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