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,
71 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
72 const SALOMEDS::TMPFile& theStream,
76 void Close(SALOMEDS::SComponent_ptr theComponent);
77 char* ComponentDataType();
79 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
80 const char* IORString,
81 CORBA::Boolean isMultiFile);
82 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
83 const char* aLocalPersistentID,
84 CORBA::Boolean isMultiFile)
85 throw(SALOME::SALOME_Exception);
87 bool CanPublishInStudy(CORBA::Object_ptr theIOR);
89 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
90 SALOMEDS::SObject_ptr theSObject,
91 CORBA::Object_ptr theObject,
92 const char* theName) throw (SALOME::SALOME_Exception) ;
94 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
95 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
96 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
97 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
98 CORBA::Long theObjectID,
99 SALOMEDS::SObject_ptr theObject);
102 static map <string, string>_MedCorbaObj;
103 static string _myFileName;
104 static string _saveFileName;
112 SALOME_NamingService *_NS;