]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM_I/MEDMEM_Mesh_i.hxx
Salome HOME
updating the main trunk with the CEA debug devellopment from the branch
[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   CORBA::Long            getElementNumber(SALOME_MED::medConnectivity mode,
120                                           SALOME_MED::medEntityMesh entity,
121                                           SALOME_MED::medGeometryElement type,
122                                           const SALOME_MED::long_array& connectivity)
123                          throw  (SALOME::SALOME_Exception);
124
125   SALOME_MED::long_array*   getReverseConnectivity(SALOME_MED::medConnectivity mode)
126                          throw  (SALOME::SALOME_Exception);
127
128   SALOME_MED::long_array*   getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
129                          throw        (SALOME::SALOME_Exception);
130
131     // Family and Group
132     CORBA::Long               getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
133                                         throw (SALOME::SALOME_Exception);
134     CORBA::Long               getNumberOfGroups(SALOME_MED::medEntityMesh entity) 
135                                         throw (SALOME::SALOME_Exception);
136     SALOME_MED::Family_array* getFamilies(SALOME_MED::medEntityMesh entity) 
137                                         throw (SALOME::SALOME_Exception);
138     SALOME_MED::FAMILY_ptr    getFamily    (SALOME_MED::medEntityMesh entity,
139                                             CORBA::Long i) 
140                                         throw (SALOME::SALOME_Exception);
141     SALOME_MED::Group_array*  getGroups(SALOME_MED::medEntityMesh entity) 
142                                         throw (SALOME::SALOME_Exception);
143     SALOME_MED::GROUP_ptr     getGroup (SALOME_MED::medEntityMesh entity, 
144                                             CORBA::Long i) 
145                                         throw (SALOME::SALOME_Exception);
146     // 
147     SALOME_MED::SUPPORT_ptr getBoundaryElements(SALOME_MED::medEntityMesh entity)
148                                      throw (SALOME::SALOME_Exception);
149     SALOME_MED::SUPPORT_ptr getSkin        (SALOME_MED::SUPPORT_ptr mySupport3D)
150                                      throw (SALOME::SALOME_Exception);
151     // 
152     SALOME_MED::FIELD_ptr getVolume        (SALOME_MED::SUPPORT_ptr mySupport)
153                                      throw (SALOME::SALOME_Exception);
154     SALOME_MED::FIELD_ptr getArea          (SALOME_MED::SUPPORT_ptr mySupport)          
155                                      throw (SALOME::SALOME_Exception);
156     SALOME_MED::FIELD_ptr getLength        (SALOME_MED::SUPPORT_ptr mySupport)        
157                                      throw (SALOME::SALOME_Exception);
158     SALOME_MED::FIELD_ptr getNormal        (SALOME_MED::SUPPORT_ptr mySupport)        
159                                      throw (SALOME::SALOME_Exception);
160     SALOME_MED::FIELD_ptr getBarycenter    (SALOME_MED::SUPPORT_ptr mySupport)    
161                                      throw (SALOME::SALOME_Exception);
162     SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport) 
163                                      throw (SALOME::SALOME_Exception);
164
165
166     // Others
167     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
168                             SALOME_MED::MESH_ptr myIor)   
169                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
170     void        addInStudy (SALOMEDS::Study_ptr myStudy, 
171                             SALOME_MED::MESH_ptr myIor,
172                             const std::string & fileName)   
173                             throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
174     CORBA::Long addDriver  (SALOME_MED::medDriverTypes driverType, 
175                             const char* fileName, const char* meshName)
176                                                           throw (SALOME::SALOME_Exception);
177     void        rmDriver   (CORBA::Long i)                throw (SALOME::SALOME_Exception);
178     void        read       (CORBA::Long i)                throw (SALOME::SALOME_Exception);
179     void        write      (CORBA::Long i, const char* driverMeshName)
180                                                           throw (SALOME::SALOME_Exception);
181
182     //                                  Cuisine interne
183     CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
184     ::MEDMEM::MESH * constructConstMesh() const;
185     SALOME_MED::MESH::meshInfos * getMeshGlobal()
186                                   throw (SALOME::SALOME_Exception);
187     SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
188                                   throw (SALOME::SALOME_Exception);
189     SALOME_MED::MESH::connectivityInfos * getConnectGlobal
190                                   (SALOME_MED::medEntityMesh entity)
191                                   throw (SALOME::SALOME_Exception);
192     CORBA::Boolean areEquals(SALOME_MED::MESH_ptr other);
193
194 };
195 }
196
197 #endif /* _MED_MESH_I_HXX_ */