]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM_I/MEDMEM_Med_i.hxx
Salome HOME
updating the main trunk with the CEA debug devellopment from the branch
[modules/med.git] / src / MEDMEM_I / MEDMEM_Med_i.hxx
1 //=============================================================================
2 // File      : MEDMEM_Med_i.hxx
3 // Project   : SALOME
4 // Author    : EDF
5 // Copyright : EDF 2002
6 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Med_i.hxx
7 //=============================================================================
8
9 #ifndef _MED_MED_I_HXX_
10 #define _MED_MED_I_HXX_
11
12 #include <string>
13
14 #include <SALOMEconfig.h>
15
16 #include "SALOME_GenericObj_i.hh"
17 #include CORBA_SERVER_HEADER(MED)
18 #include CORBA_SERVER_HEADER(SALOMEDS)
19 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20
21 #include "MEDMEM_Med.hxx"
22
23 namespace MEDMEM {
24 typedef map<DT_IT_, SALOME_MED::FIELD_ptr, LT_DT_IT_ > MAP_IOR_DT_IT_; 
25
26 class MED_i: public POA_SALOME_MED::MED,
27              public SALOME::GenericObj_i
28 {
29
30 private :
31
32 protected:
33     // C++ object containing values
34   //::MED * const _med;
35   ::MEDMEM::MED * _med;
36   string _medId;
37
38   map<string,SALOME_MED::MESH_ptr>    _meshes;   // We can't have two MESHes with the same name.  
39
40   map<string,map<MED_EN::medEntityMesh,SALOME_MED::SUPPORT_ptr> > _supports; 
41
42   map<string,MAP_IOR_DT_IT_>          _fields;   // We can't have two FIELDs with the same name. 
43   
44 public:
45     // Constructors and associated internal methods
46     MED_i();
47   //    MED_i(::MED * const m);
48   //    MED_i(MED_i & m);
49     ~MED_i();
50
51   void init(SALOMEDS::Study_ptr myStudy, driverTypes driverType, const string & fileName); // Analyse the file <fileName> by calling readFileStruct
52
53   void initWithFieldType(SALOMEDS::Study_ptr myStudy, driverTypes driverType, const string & fileName); // Same method as above but with storage of fields with their type
54
55   void addInStudy(SALOMEDS::Study_ptr myStudy, SALOME_MED::MED_ptr myIor,
56                   const char * medObjName)
57     throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
58
59     // IDL Methods 
60     CORBA::Long             getNumberOfMeshes() throw (SALOME::SALOME_Exception);
61     CORBA::Long             getNumberOfFields() throw (SALOME::SALOME_Exception);
62     SALOME_MED::string_array * getMeshNames()      throw (SALOME::SALOME_Exception);
63     SALOME_MED::string_array * getFieldNames()     throw (SALOME::SALOME_Exception);
64     SALOME_MED::MESH_ptr    getMeshByName(const char* meshName) 
65                                                 throw (SALOME::SALOME_Exception);
66     SALOME_MED::MESH_ptr    getMesh(SALOME_MED::FIELD_ptr fieldPtr) 
67                                                 throw (SALOME::SALOME_Exception);
68     CORBA::Long getFieldNumberOfIteration(const char* fieldName) 
69       throw (SALOME::SALOME_Exception);
70     SALOME_MED::long_array * getFieldIteration(const char* fieldName, CORBA::Long i) 
71       throw (SALOME::SALOME_Exception);
72     SALOME_MED::long_array * getFieldIterations(const char* fieldName) 
73       throw (SALOME::SALOME_Exception);
74     SALOME_MED::FIELD_ptr   getField(const char* fieldName,
75                                      CORBA::Long pasTemps, 
76                                      CORBA::Long numOrdre) 
77                                                 throw (SALOME::SALOME_Exception);
78     CORBA::Long             addDriver(SALOME_MED::medDriverTypes driverType, 
79                                       const char* fileName) 
80                                                 throw (SALOME::SALOME_Exception);
81     void                    rmDriver(CORBA::Long i) 
82                                                 throw (SALOME::SALOME_Exception);
83     void                    readFileStruct(CORBA::Long i) 
84                                                 throw (SALOME::SALOME_Exception);
85     void                    writeFrom(CORBA::Long i) 
86                                                 throw (SALOME::SALOME_Exception);
87     void                    write(CORBA::Long i) 
88                                                 throw (SALOME::SALOME_Exception);
89     void                    addMesh(SALOME_MED::MESH_ptr ptrMesh) 
90                                                 throw (SALOME::SALOME_Exception);
91     void                    addField(SALOME_MED::FIELD_ptr ptrField) 
92                                                 throw (SALOME::SALOME_Exception);
93     void                    addInStudy(SALOMEDS::Study_ptr myStudy,
94                                        SALOME_MED::MED_ptr myIor) 
95                                                 throw (SALOME::SALOME_Exception,
96                                                        SALOMEDS::StudyBuilder::LockProtection);
97 };
98 }
99
100 #endif /* _MED_MED_I_HXX_ */