Salome HOME
23582: [CEA] Rename MED module to FIELDS
[modules/med.git] / src / MEDCalc / cmp / MED.hxx
index 73270a20861650b1c7e7838dcefdb804a6298b8c..bd3246683265e3921cdb0845fae6cc11e1e90876 100644 (file)
 #ifndef _MED_HXX_
 #define _MED_HXX_
 
-#ifdef WIN32
-# if defined MEDENGINE_EXPORTS || defined MEDEngine_EXPORTS
-#  define MEDENGINE_EXPORT __declspec( dllexport )
-# else
-#  define MEDENGINE_EXPORT __declspec( dllimport )
-# endif
-#else
-# define MEDENGINE_EXPORT
-#endif
-
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(MED_Gen)
 #include CORBA_SERVER_HEADER(MEDDataManager)
 #include CORBA_CLIENT_HEADER(SALOMEDS)
 #include <SALOME_Component_i.hxx>
-#include <SALOMEDS_Study.hxx>
 
 #include <map>
 #include <string>
 
-class MEDENGINE_EXPORT MED :
+#include "MEDCALC.hxx"
+
+class MEDCALC_EXPORT MED :
   public POA_MED_ORB::MED_Gen,
   public Engines_Component_i
 {
@@ -52,38 +43,52 @@ public:
       const char* interfaceName);
   virtual ~MED();
 
-  MED_ORB::status addDatasourceToStudy(SALOMEDS::Study_ptr study,
-                                       const MEDCALC::DatasourceHandler& datasourceHandler);
+  MED_ORB::status addDatasourceToStudy(const MEDCALC::DatasourceHandler& datasourceHandler);
+
+  MED_ORB::status registerPresentationField(CORBA::Long fieldId,
+                                            const char* name,
+                                            const char* type,
+                                            const char* ico,
+                                            CORBA::Long presentationId);
+
+  MED_ORB::status registerPresentationMesh(CORBA::Long meshId,
+                                           const char* name,
+                                           const char* type,
+                                           const char* ico,
+                                           CORBA::Long presentationId);
+
+  MED_ORB::status unregisterPresentation(CORBA::Long presentationId);
+
+//  // Caller owns the returned list, and is responsible for the list deletion.
+//  MED_ORB::PresentationsList* getSiblingPresentations(CORBA::Long presentationId);
+
+  // Get all presentations registered in the study
+  MED_ORB::PresentationsList* getStudyPresentations();
 
-  MED_ORB::status registerPresentation(SALOMEDS::Study_ptr study,
-                                       CORBA::Long fieldId,
-                                       const char* name,
-                                       const char* label,
-                                       CORBA::Long presentationId);
+  char* getStudyPresentationEntry(CORBA::Long presentationId);
 
-  MED_ORB::status unregisterPresentation(SALOMEDS::Study_ptr study,
-                                         CORBA::Long presentationId);
+  void cleanUp();
 
   /*! Dump the study as a Python file */
-  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
-                                       CORBA::Boolean isPublished,
+  virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
                                        CORBA::Boolean isMultiFile,
                                        CORBA::Boolean& isValidScript);
 
   // For tooltips
   virtual CORBA::Boolean hasObjectInfo();
-  virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
+  virtual char* getObjectInfo(const char* entry);
 
  private:
   std::map<long, std::string> _fieldSeriesEntries;
+  std::map<long, std::string> _meshEntries;
 };
 
 extern "C"
-MEDENGINE_EXPORT
-PortableServer::ObjectId* MEDEngine_factory( CORBA::ORB_ptr orb,
-                                             PortableServer::POA_ptr poa,
-                                             PortableServer::ObjectId* contId,
-                                             const char* instanceName,
-                                             const char* interfaceName );
+MEDCALC_EXPORT
+PortableServer::ObjectId* FIELDSEngine_factory( CORBA::ORB_ptr orb,
+                                               PortableServer::POA_ptr poa,
+                                               PortableServer::ObjectId* contId,
+                                               const char* instanceName,
+                                               const char* interfaceName );
 
 #endif