Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _MED_GEN_I_HXX_
00029 #define _MED_GEN_I_HXX_
00030
00031 #include <SALOMEconfig.h>
00032 #include <map>
00033 #include CORBA_SERVER_HEADER(MED_Gen)
00034 #include CORBA_SERVER_HEADER(MED)
00035 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
00036
00037 #include "SALOME_Component_i.hxx"
00038 #include "SALOME_NamingService.hxx"
00039
00040 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00041
00042 #include "Med_Gen_Driver_i.hxx"
00043
00044 namespace MEDMEM {
00045 class MED_i;
00046 }
00047
00048 #ifdef WNT
00049 #if defined MED_EXPORTS || defined MEDEngine_EXPORTS
00050 #if defined WIN32
00051 #define MED_EXPORT __declspec( dllexport )
00052 #else
00053 #define MED_EXPORT
00054 #endif
00055 #else
00056 #if defined WIN32
00057 #define MED_EXPORT __declspec( dllimport )
00058 #else
00059 #define MED_EXPORT
00060 #endif
00061 #endif
00062 #else
00063 #define MED_EXPORT
00064 #endif
00065
00066 class MED_EXPORT Med_Gen_i:
00067 public POA_SALOME_MED::MED_Gen,
00068 public Engines_Component_i,
00069 public Med_Gen_Driver_i
00070 {
00071 private:
00072 SALOMEDS::Study_var studyName2Study(const char* studyName)
00073 throw(SALOME::SALOME_Exception);
00074 void addInStudy(SALOMEDS::Study_var myStudy)
00075 throw(SALOME::SALOME_Exception);
00076
00077 public:
00078
00079 Med_Gen_i(CORBA::ORB_ptr orb,
00080 PortableServer::POA_ptr poa,
00081 PortableServer::ObjectId * contId,
00082 const char *instanceName,
00083 const char *interfaceName);
00084 virtual ~Med_Gen_i();
00085
00086
00087 SALOME_MED::GMESH_ptr readMeshInFile(const char* fileName,
00088 const char* studyName,
00089 const char* meshName)
00090 throw(SALOME::SALOME_Exception);
00091
00092 SALOME_MED::FIELD_ptr readFieldInFile(const char* fileName,
00093 const char* studyName,
00094 const char* fieldName,
00095 CORBA::Long iter,
00096 CORBA::Long ordre)
00097 throw(SALOME::SALOME_Exception);
00098
00099 SALOME_MED::MED_ptr readStructFile(const char* fileName,
00100 const char* studyName)
00101 throw(SALOME::SALOME_Exception);
00102
00103 void readStructFileWithFieldType(const char* fileName,
00104 const char* studyName)
00105 throw(SALOME::SALOME_Exception);
00106
00107
00108 static Med_Gen_i* GetMEDGen() { return _MEDGen; }
00109
00110
00111 static SALOME_MED::MED_ptr GetMED(SALOMEDS::SComponent_ptr theStudy);
00112
00113
00114 static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject );
00115
00116 template<class T>
00117 static T DownCast(CORBA::Object_ptr theArg)
00118 {
00119 return dynamic_cast<T>(GetServant(theArg).in());
00120 }
00121
00122
00123 char* ComponentDataType();
00124 virtual Engines::EngineComponent_ptr GetComponentInstance();
00125
00126 private:
00127
00128
00129 static Med_Gen_i* _MEDGen;
00130
00131 private:
00132 bool _duringLoad;
00133
00134
00135
00136
00137 };
00138
00139 #endif