Salome HOME
GUI callback: add MEDPresentation
[modules/med.git] / src / MEDCalc / cmp / MEDPresentationManager_i.hxx
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _MED_PRESENTATION_MANAGER_I_HXX_
21 #define _MED_PRESENTATION_MANAGER_I_HXX_
22
23 #include <SALOMEconfig.h>
24 #include CORBA_SERVER_HEADER(MEDDataManager)
25 #include CORBA_SERVER_HEADER(MEDPresentationManager)
26 #include "SALOME_GenericObj_i.hh"
27
28 #include "MEDDataManager_i.hxx"
29 #include "MEDCALC.hxx"
30
31 #include <vector>
32 #include <string>
33
34 typedef ::CORBA::Long TypeID;
35
36 class MEDPresentation;
37
38 class MEDCALC_EXPORT MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
39                                                public SALOME::GenericObj_i
40 {
41  public:
42
43   static MEDPresentationManager_i* getInstance();
44
45   TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&);
46   void setPresentationProperty(TypeID presentationID, const char * propName, const char * propValue);
47   char* getPresentationProperty(TypeID presentationID, const char* propName);
48
49  private:
50   MEDPresentationManager_i();
51   virtual ~MEDPresentationManager_i();
52
53  private :
54
55   // The MEDPresentationManager is a singleton, whose instance can be obtained
56   // using the getInstance static method.
57   static MEDPresentationManager_i * _instance;
58   static TypeID GenerateID();
59
60   // Owns a list of MEDPresentation objects
61   std::map< TypeID, MEDPresentation * > _presentations;
62
63 };
64
65 #endif // _MED_PRESENTATION_MANAGER_I_HXX_