]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM_I/MEDMEM_Mesh_i.hxx
Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / src / MEDMEM_I / MEDMEM_Mesh_i.hxx
1 //=============================================================================
2 // File      : MEDMEM_Mesh_i.hxx
3 // Project   : SALOME
4 // Author    : EDF 
5 // Copyright : EDF 2002
6 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Mesh_i.hxx
7 //=============================================================================
8
9 #ifndef _MED_MESH_I_HXX_
10 #define _MED_MESH_I_HXX_
11
12 #include <map>
13 #include <string>
14
15 #include <SALOMEconfig.h>
16 #include "SALOMEMultiComm.hxx"
17 #include "SALOME_GenericObj_i.hh"
18 #include CORBA_SERVER_HEADER(MED)
19 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20 #include CORBA_SERVER_HEADER(SALOME_Comm)
21
22 namespace MEDMEM {
23 class MESH;
24 class MESH_i: public POA_SALOME_MED::MESH,
25               public SALOMEMultiComm,
26               public SALOME::GenericObj_i
27 {
28 public :
29     static std::map < int,::MEDMEM::MESH *> meshMap;
30 private :
31     static int meshIndex;
32
33 private :
34
35 protected:
36     // C++ object containing values
37     ::MEDMEM::MESH * const _mesh;
38     const int      _corbaIndex;
39     std::string         _meshId;
40
41
42 public:
43
44   // Constructors and associated internal methods
45   MESH_i();
46   MESH_i(::MEDMEM::MESH * const m);
47   MESH_i(MESH_i & m);
48   ~MESH_i();
49
50   // IDL Methods 
51   char *          getName()             throw (SALOME::SALOME_Exception);
52   
53   CORBA::Long     getSpaceDimension()   throw (SALOME::SALOME_Exception);
54
55   CORBA::Long     getMeshDimension()    throw (SALOME::SALOME_Exception);
56   
57   CORBA::Boolean  getIsAGrid()          throw (SALOME::SALOME_Exception);
58
59   CORBA::Boolean  existConnectivity
60                       ( SALOME_MED::medConnectivity connectivityType,
61                         SALOME_MED::medEntityMesh entity)
62                          throw (SALOME::SALOME_Exception);
63
64   char *          getCoordinatesSystem() 
65                          throw (SALOME::SALOME_Exception);
66   
67   SALOME_MED::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
68                          throw (SALOME::SALOME_Exception);
69
70   SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch typeSwitch)
71     throw (SALOME::SALOME_Exception);
72   
73   CORBA::Double  getCoordinate(CORBA::Long Number, CORBA::Long Axis)
74                          throw (SALOME::SALOME_Exception);
75
76   SALOME_MED::string_array* getCoordinatesNames() 
77                          throw (SALOME::SALOME_Exception);
78   
79   SALOME_MED::string_array* getCoordinatesUnits()
80                          throw (SALOME::SALOME_Exception); 
81   
82   CORBA::Long     getNumberOfNodes() 
83                          throw (SALOME::SALOME_Exception);
84   
85   CORBA::Long     getNumberOfTypes       (SALOME_MED::medEntityMesh entity) 
86                          throw   (SALOME::SALOME_Exception);
87   
88   SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
89                          throw   (SALOME::SALOME_Exception);
90
91   SALOME_MED::medGeometryElement   getElementType(SALOME_MED::medEntityMesh entity,
92                                                   CORBA::Long number)
93                          throw   (SALOME::SALOME_Exception);
94
95   
96   CORBA::Long     getNumberOfElements (SALOME_MED::medEntityMesh entity,
97                                        SALOME_MED::medGeometryElement geomElement) 
98                          throw (SALOME::SALOME_Exception);
99   
100   SALOME_MED::long_array*   getConnectivity(SALOME_MED::medModeSwitch typeSwitch, 
101                                          SALOME_MED::medConnectivity mode, 
102                                          SALOME_MED::medEntityMesh entity, 
103                                          SALOME_MED::medGeometryElement geomElement)
104                          throw (SALOME::SALOME_Exception);
105
106   SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch typeSwitch, 
107                                               SALOME_MED::medConnectivity mode, 
108                                               SALOME_MED::medEntityMesh entity, 
109                                               SALOME_MED::medGeometryElement geomElement)
110                          throw (SALOME::SALOME_Exception);
111   
112   SALOME_MED::long_array*   getConnectivityIndex(SALOME_MED::medConnectivity mode,
113                                               SALOME_MED::medEntityMesh entity)
114                          throw (SALOME::SALOME_Exception);
115   
116   SALOME_MED::long_array*   getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
117                          throw (SALOME::SALOME_Exception);
118
119   SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity mode,
120                                                          SALOME_MED::medEntityMesh entity)
121     throw (SALOME::SALOME_Exception);
122   SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity mode,
123                                                               SALOME_MED::medEntityMesh entity)
124     throw (SALOME::SALOME_Exception);
125
126   SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity mode)
127     throw (SALOME::SALOME_Exception);
128   SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity mode)
129     throw (SALOME::SALOME_Exception);
130   SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex()
131     throw (SALOME::SALOME_Exception);
132
133   CORBA::Long            getElementNumber(SALOME_MED::medConnectivity mode,
134                                           SALOME_MED::medEntityMesh entity,
135                                           SALOME_MED::medGeometryElement type,
136                                           const SALOME_MED::long_array& connectivity)
137                          throw  (SALOME::SALOME_Exception);
138
139   SALOME_MED::long_array*   getReverseConnectivity(SALOME_MED::medConnectivity mode)
140                          throw  (SALOME::SALOME_Exception);
141
142   SALOME_MED::long_array*   getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
143                          throw        (SALOME::SALOME_Exception);
144
145     // Family and Group
146     CORBA::Long               getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
147                                         throw (SALOME::SALOME_Exception);
148     CORBA::Long               getNumberOfGroups(SALOME_MED::medEntityMesh entity) 
149                                         throw (SALOME::SALOME_Exception);
150     SALOME_MED::Family_array* getFamilies(SALOME_MED::medEntityMesh entity) 
151                                         throw (SALOME::SALOME_Exception);
152     SALOME_MED::FAMILY_ptr    getFamily    (SALOME_MED::medEntityMesh entity,
153                                             CORBA::Long i) 
154                                         throw (SALOME::SALOME_Exception);
155     SALOME_MED::Group_array*  getGroups(SALOME_MED::medEntityMesh entity) 
156                                         throw (SALOME::SALOME_Exception);
157     SALOME_MED::GROUP_ptr     getGroup (SALOME_MED::medEntityMesh entity, 
158                                             CORBA::Long i) 
159                                         throw (SALOME::SALOME_Exception);
160     // 
161     SALOME_MED::SUPPORT_ptr getBoundaryElements(SALOME_MED::medEntityMesh entity)
162                                      throw (SALOME::SALOME_Exception);
163     SALOME_MED::SUPPORT_ptr getSkin        (SALOME_MED::SUPPORT_ptr mySupport3D)
164                                      throw (SALOME::SALOME_Exception);
165     // 
166     SALOME_MED::FIELD_ptr getVolume        (SALOME_MED::SUPPORT_ptr mySupport)
167                                      throw (SALOME::SALOME_Exception);
168     SALOME_MED::FIELD_ptr getArea          (SALOME_MED::SUPPORT_ptr mySupport)          
169                                      throw (SALOME::SALOME_Exception);
170     SALOME_MED::FIELD_ptr getLength        (SALOME_MED::SUPPORT_ptr mySupport)        
171                                      throw (SALOME::SALOME_Exception);
172     SALOME_MED::FIELD_ptr getNormal        (SALOME_MED::SUPPORT_ptr mySupport)        
173                                      throw (SALOME::SALOME_Exception);
174     SALOME_MED::FIELD_ptr getBarycenter    (SALOME_MED::SUPPORT_ptr mySupport)    
175                                      throw (SALOME::SALOME_Exception);
176     SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport) 
177                                      throw (SALOME::SALOME_Exception);
178
179
180     // Others
181     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
182                             SALOME_MED::MESH_ptr myIor)   
183                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
184     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
185                             SALOME_MED::MESH_ptr myIor,
186                             const std::string & fileName)   
187                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
188     CORBA::Long addDriver  (SALOME_MED::medDriverTypes driverType, 
189                             const char* fileName, const char* meshName)
190                                                           throw (SALOME::SALOME_Exception);
191     void        rmDriver   (CORBA::Long i)                throw (SALOME::SALOME_Exception);
192     void        read       (CORBA::Long i)                throw (SALOME::SALOME_Exception);
193     void        write      (CORBA::Long i, const char* driverMeshName)
194                                                           throw (SALOME::SALOME_Exception);
195
196     //                                  Cuisine interne
197     CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
198     ::MEDMEM::MESH * constructConstMesh() const;
199     SALOME_MED::MESH::meshInfos * getMeshGlobal()
200                                   throw (SALOME::SALOME_Exception);
201     SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
202                                   throw (SALOME::SALOME_Exception);
203     SALOME_MED::MESH::connectivityInfos * getConnectGlobal
204                                   (SALOME_MED::medEntityMesh entity)
205                                   throw (SALOME::SALOME_Exception);
206     CORBA::Boolean areEquals(SALOME_MED::MESH_ptr other);
207
208 };
209 }
210
211 #endif /* _MED_MESH_I_HXX_ */