1 // Copyright (C) 2015-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 # if defined MEDENGINE_EXPORTS || defined MEDEngine_EXPORTS
25 # define MEDENGINE_EXPORT __declspec( dllexport )
27 # define MEDENGINE_EXPORT __declspec( dllimport )
30 # define MEDENGINE_EXPORT
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(MED_Gen)
35 #include CORBA_SERVER_HEADER(MEDDataManager)
36 #include CORBA_CLIENT_HEADER(SALOMEDS)
37 #include <SALOME_Component_i.hxx>
38 #include <SALOMEDS_Study.hxx>
43 class MEDENGINE_EXPORT MED :
44 public POA_MED_ORB::MED_Gen,
45 public Engines_Component_i
48 MED(CORBA::ORB_ptr orb,
49 PortableServer::POA_ptr poa,
50 PortableServer::ObjectId* contId,
51 const char* instanceName,
52 const char* interfaceName);
55 MED_ORB::status addDatasourceToStudy(SALOMEDS::Study_ptr study,
56 const MEDCALC::DatasourceHandler& datasourceHandler);
58 MED_ORB::status registerPresentationField(SALOMEDS::Study_ptr study,
63 CORBA::Long presentationId);
65 MED_ORB::status registerPresentationMesh(SALOMEDS::Study_ptr study,
70 CORBA::Long presentationId);
72 MED_ORB::status unregisterPresentation(SALOMEDS::Study_ptr study,
73 CORBA::Long presentationId);
75 // // Caller owns the returned list, and is responsible for the list deletion.
76 // MED_ORB::PresentationsList* getSiblingPresentations(SALOMEDS::Study_ptr study,
77 // CORBA::Long presentationId);
79 // Get all presentations registered in the study
80 MED_ORB::PresentationsList* getStudyPresentations(SALOMEDS::Study_ptr study);
82 char* getStudyPresentationEntry(SALOMEDS::Study_ptr study, CORBA::Long presentationId);
86 /*! Dump the study as a Python file */
87 virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
88 CORBA::Boolean isPublished,
89 CORBA::Boolean isMultiFile,
90 CORBA::Boolean& isValidScript);
93 virtual CORBA::Boolean hasObjectInfo();
94 virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
97 std::map<long, std::string> _fieldSeriesEntries;
98 std::map<long, std::string> _meshEntries;
103 PortableServer::ObjectId* MEDEngine_factory( CORBA::ORB_ptr orb,
104 PortableServer::POA_ptr poa,
105 PortableServer::ObjectId* contId,
106 const char* instanceName,
107 const char* interfaceName );