1 //=============================================================================
2 // File : MEDMEM_Med_i.hxx
5 // Copyright : EDF 2002
6 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Med_i.hxx
7 //=============================================================================
9 #ifndef _MED_MED_I_HXX_
10 #define _MED_MED_I_HXX_
14 #include <SALOMEconfig.h>
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)
21 #include "MEDMEM_Med.hxx"
24 typedef map<DT_IT_, SALOME_MED::FIELD_ptr, LT_DT_IT_ > MAP_IOR_DT_IT_;
26 class MED_i: public POA_SALOME_MED::MED,
27 public SALOME::GenericObj_i
33 // C++ object containing values
38 map<string,SALOME_MED::MESH_ptr> _meshes; // We can't have two MESHes with the same name.
40 map<string,map<MED_EN::medEntityMesh,SALOME_MED::SUPPORT_ptr> > _supports;
42 map<string,MAP_IOR_DT_IT_> _fields; // We can't have two FIELDs with the same name.
45 // Constructors and associated internal methods
47 // MED_i(::MED * const m);
51 void init(SALOMEDS::Study_ptr myStudy, driverTypes driverType, const string & fileName); // Analyse the file <fileName> by calling readFileStruct
53 void initWithFieldType(SALOMEDS::Study_ptr myStudy, driverTypes driverType, const string & fileName); // Same method as above but with storage of fields with their type
55 void addInStudy(SALOMEDS::Study_ptr myStudy, SALOME_MED::MED_ptr myIor,
56 const char * medObjName)
57 throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
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,
77 throw (SALOME::SALOME_Exception);
78 CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
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);
100 #endif /* _MED_MED_I_HXX_ */