1 //=============================================================================
2 // File : Med_Gen_i.hxx
3 // Created : mer fév 20 15:47:52 CET 2002
4 // Author : Paul RASCLE, EDF
6 // Copyright : EDF 2001
8 //=============================================================================
10 #ifndef _MED_GEN_I_HXX_
11 #define _MED_GEN_I_HXX_
13 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(Med_Gen)
16 #include CORBA_SERVER_HEADER(MED)
18 #include "SALOME_Component_i.hxx"
19 #include "SALOME_NamingService.hxx"
21 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
24 public POA_Engines::Med_Gen,
25 public Engines_Component_i
28 SALOMEDS::Study_var studyName2Study(const char* studyName)
29 throw(SALOME::SALOME_Exception);
30 void addInStudy(SALOMEDS::Study_var myStudy)
31 throw(SALOME::SALOME_Exception);
35 Med_Gen_i(CORBA::ORB_ptr orb,
36 PortableServer::POA_ptr poa,
37 PortableServer::ObjectId * contId,
38 const char *instanceName,
39 const char *interfaceName);
43 SALOME_MED::MESH_ptr readMeshInFile(const char* fileName,
44 const char* studyName,
46 throw(SALOME::SALOME_Exception);
48 SALOME_MED::FIELD_ptr readFieldInFile(const char* fileName,
49 const char* studyName,
50 const char* fieldName,
53 throw(SALOME::SALOME_Exception);
55 SALOME_MED::MED_ptr readStructFile(const char* fileName,
56 const char* studyName)
57 throw(SALOME::SALOME_Exception);
59 void readStructFileWithFieldType(const char* fileName,
60 const char* studyName)
61 throw(SALOME::SALOME_Exception);
63 // inherited methods from SALOMEDS::Driver
65 // void Save(const char *IORSComponent, const char *aUrlOfFile);
66 // void Load(const char *IORSComponent, const char *aUrlOfFile);
67 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent);
68 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream);
69 void Close(const char *IORSComponent);
70 char* ComponentDataType();
72 char* IORToLocalPersistentID(const char* IORString, CORBA::Boolean& IsAFile);
73 char* LocalPersistentIDToIOR(const char* aLocalPersistentID);
75 bool CanPublishInStudy(CORBA::Object_ptr theIOR);
77 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
78 SALOMEDS::SObject_ptr theSObject,
79 CORBA::Object_ptr theObject,
80 const char* theName) throw (SALOME::SALOME_Exception) ;
82 static map <string, string>_MedCorbaObj;
83 static string _myFileName;
84 static string _saveFileName;
92 SALOME_NamingService *_NS;