Salome HOME
GUI callback: add MEDPresentation
[modules/med.git] / src / MEDCalc / cmp / MEDPresentationManager_i.cxx
index 47cca67da0cd6293c7c092f93c4dcd897446b94c..a268f47f84e3a569be08c8707ff991f52b7d984e 100644 (file)
@@ -56,7 +56,7 @@ TypeID MEDPresentationManager_i::GenerateID()
 #include <iostream>
 
 void
-MEDPresentationManager_i::setPresentationProperty(TypeID presentationID, const char * propName, const char *  propValue)
+MEDPresentationManager_i::setPresentationProperty(TypeID presentationID, const char * propName, const char * propValue)
 {
   if (_presentations.find(presentationID) != _presentations.end())
     {
@@ -69,6 +69,19 @@ MEDPresentationManager_i::setPresentationProperty(TypeID presentationID, const c
     }
 }
 
+char*
+MEDPresentationManager_i::getPresentationProperty(TypeID presentationID, const char* propName)
+{
+  if (_presentations.find(presentationID) != _presentations.end()) {
+    MEDPresentation* pres = _presentations[presentationID];
+    return (char*) pres->getProperty(propName).c_str();
+  }
+  else {
+    std::cerr << "getPresentationProperty(): presentation not found!!" << std::endl;
+    return (char*) "";
+  }
+}
+
 TypeID
 MEDPresentationManager_i::makeScalarMap(const MEDCALC::ScalarMapParameters& params)
 {