X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCalc%2Fcmp%2FMED.hxx;h=bd3246683265e3921cdb0845fae6cc11e1e90876;hb=a1c6c7c23dfa9ee3eed102b7b85b8183c3ee86e8;hp=196fbdaf25cdd058fa5977be34fd4f3980703d49;hpb=688faba08168e98ca5cb3d4e6d38e84b228eaf44;p=modules%2Fmed.git diff --git a/src/MEDCalc/cmp/MED.hxx b/src/MEDCalc/cmp/MED.hxx index 196fbdaf2..bd3246683 100644 --- a/src/MEDCalc/cmp/MED.hxx +++ b/src/MEDCalc/cmp/MED.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2015 CEA/DEN, EDF R&D +// Copyright (C) 2015-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -20,27 +20,18 @@ #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 #include CORBA_SERVER_HEADER(MED_Gen) #include CORBA_SERVER_HEADER(MEDDataManager) #include CORBA_CLIENT_HEADER(SALOMEDS) #include -#include #include #include -class MEDENGINE_EXPORT MED : +#include "MEDCALC.hxx" + +class MEDCALC_EXPORT MED : public POA_MED_ORB::MED_Gen, public Engines_Component_i { @@ -52,30 +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 registerPresentation(SALOMEDS::Study_ptr study, - CORBA::Long fieldId, - const char* name, - const char* label); + 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(); + + char* getStudyPresentationEntry(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(const char* entry); + private: std::map _fieldSeriesEntries; + std::map _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