1 // MED MED : implemetation of MED idl descriptions
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : Med_Gen_i.hxx
25 // Author : Paul RASCLE, EDF
29 #ifndef _MED_GEN_I_HXX_
30 #define _MED_GEN_I_HXX_
32 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(MED_Gen)
35 #include CORBA_SERVER_HEADER(MED)
36 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
38 #include "SALOME_Component_i.hxx"
39 #include "SALOME_NamingService.hxx"
41 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
44 public POA_SALOME_MED::MED_Gen,
45 public Engines_Component_i
48 SALOMEDS::Study_var studyName2Study(const char* studyName)
49 throw(SALOME::SALOME_Exception);
50 void addInStudy(SALOMEDS::Study_var myStudy)
51 throw(SALOME::SALOME_Exception);
55 Med_Gen_i(CORBA::ORB_ptr orb,
56 PortableServer::POA_ptr poa,
57 PortableServer::ObjectId * contId,
58 const char *instanceName,
59 const char *interfaceName);
63 SALOME_MED::MESH_ptr readMeshInFile(const char* fileName,
64 const char* studyName,
66 throw(SALOME::SALOME_Exception);
68 SALOME_MED::FIELD_ptr readFieldInFile(const char* fileName,
69 const char* studyName,
70 const char* fieldName,
73 throw(SALOME::SALOME_Exception);
75 SALOME_MED::MED_ptr readStructFile(const char* fileName,
76 const char* studyName)
77 throw(SALOME::SALOME_Exception);
79 void readStructFileWithFieldType(const char* fileName,
80 const char* studyName)
81 throw(SALOME::SALOME_Exception);
83 // inherited methods from SALOMEDS::Driver
85 // void Save(const char *IORSComponent, const char *aUrlOfFile);
86 // void Load(const char *IORSComponent, const char *aUrlOfFile);
87 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
90 SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
94 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
95 const SALOMEDS::TMPFile& theStream,
98 CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
99 const SALOMEDS::TMPFile& theStream,
103 void Close(SALOMEDS::SComponent_ptr theComponent);
104 char* ComponentDataType();
106 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
107 const char* IORString,
108 CORBA::Boolean isMultiFile,
109 CORBA::Boolean isASCII);
110 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
111 const char* aLocalPersistentID,
112 CORBA::Boolean isMultiFile,
113 CORBA::Boolean isASCII)
114 throw(SALOME::SALOME_Exception);
116 bool CanPublishInStudy(CORBA::Object_ptr theIOR);
118 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
119 SALOMEDS::SObject_ptr theSObject,
120 CORBA::Object_ptr theObject,
121 const char* theName) throw (SALOME::SALOME_Exception) ;
123 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
124 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
125 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
126 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
127 CORBA::Long theObjectID,
128 SALOMEDS::SObject_ptr theObject);
131 static map <string, string>_MedCorbaObj;
132 static string _myFileName;
133 static string _saveFileName;
141 SALOME_NamingService *_NS;