1 // Copyright (C) 2007-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
20 #ifndef _MED_PRESENTATION_MANAGER_I_HXX_
21 #define _MED_PRESENTATION_MANAGER_I_HXX_
23 #include <SALOMEconfig.h>
24 #include CORBA_SERVER_HEADER(MEDDataManager)
25 #include CORBA_SERVER_HEADER(MEDPresentationManager)
26 #include "SALOME_GenericObj_i.hh"
28 #include "MEDDataManager_i.hxx"
29 #include "MEDPresentation.hxx"
30 #include "MEDCALC.hxx"
35 class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
36 public SALOME::GenericObj_i
40 static MEDPresentationManager_i* getInstance();
42 MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&);
43 MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&);
44 MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&);
45 MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&);
46 MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&);
47 MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&);
49 MEDCALC_EXPORT void setPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue);
50 MEDCALC_EXPORT char* getPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName);
52 MEDCALC_EXPORT void updateScalarMap(MEDPresentation::TypeID presentationID, const MEDCALC::ScalarMapParameters&);
53 MEDCALC_EXPORT void updateContour(MEDPresentation::TypeID presentationID, const MEDCALC::ContourParameters&);
54 MEDCALC_EXPORT void updateVectorField(MEDPresentation::TypeID presentationID, const MEDCALC::VectorFieldParameters&);
55 MEDCALC_EXPORT void updateSlices(MEDPresentation::TypeID presentationID, const MEDCALC::SlicesParameters&);
56 MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters&);
57 MEDCALC_EXPORT void updatePointSprite(MEDPresentation::TypeID presentationID, const MEDCALC::PointSpriteParameters&);
60 MEDPresentationManager_i();
61 virtual ~MEDPresentationManager_i();
63 static MEDPresentation::TypeID GenerateID();
65 // Create a new presentation instance and return its unique ID
66 template<typename PresentationType, typename PresentationParameters>
67 MEDPresentation::TypeID _makePresentation(PresentationParameters params);
69 // Update presentation
70 template<typename PresentationType, typename PresentationParameters>
71 void _updatePresentation(MEDPresentation::TypeID presentationID, PresentationParameters params);
73 MEDPresentation* _getPresentation(MEDPresentation::TypeID) const;
77 // The MEDPresentationManager is a singleton, whose instance can be obtained
78 // using the getInstance static method.
79 static MEDPresentationManager_i* _instance;
81 // Owns a list of MEDPresentation objects
82 std::map<MEDPresentation::TypeID, MEDPresentation*> _presentations;
86 #include "MEDPresentationManager_i.txx"
88 #endif // _MED_PRESENTATION_MANAGER_I_HXX_