Salome HOME
GUI callback: add MEDPresentation
[modules/med.git] / src / MEDCalc / cmp / MEDPresentation.hxx
index d7754fd7d3964e656acca5a4e97d0dd55b839cae..ef1bdf7910b1db8edf0daac6d9d10abacf72148e 100644 (file)
 #include CORBA_SERVER_HEADER(MEDPresentationManager)
 
 #include <vector>
+#include <map>
 #include <string>
 
 class MEDCALC_EXPORT MEDPresentation
 {
-public:
   friend class MEDPresentationManager_i;
 
-  MEDPresentation(MEDCALC::FieldHandler* fieldHdl):
-    _fieldHandler(fieldHdl), _pipeline(0), _display(0)
-  {}
+public:
+
   virtual ~MEDPresentation() {}
 
-  void setProperty(const char * propName, const char * propValue);
+  void setProperty(const std::string& propName, const std::string& propValue);
+  const std::string getProperty(const std::string& propName);
   std::string getFieldTypeString();
 
 protected:
 
+  MEDPresentation(MEDCALC::FieldHandler* fieldHdl):
+    _fieldHandler(fieldHdl), _pipeline(0), _display(0), _properties()
+  {}
+
   void generatePipeline();
   virtual void internalGeneratePipeline() = 0;
   PyObject * getPythonObjectFromMain(const char * var);
@@ -61,6 +65,9 @@ protected:
 
   ///! Corresponding display object, if any:
   std::vector< PyObject * > _display;
+
+  ///! Presentation properties <key,value>
+  std::map<std::string, std::string> _properties;
 };
 
 class MEDCALC_EXPORT MEDPresentationScalarMap :  public MEDPresentation