Salome HOME
Move MEDCALC tests into SSL mode
[modules/med.git] / src / MEDCalc / cmp / MEDPresentationManager_i.hxx
index 0b073ebd57acd65a61dc236fd7f691bc7e9fc237..d4eec35515e9484e878509195dd6fcfc507dbb43 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -37,28 +37,58 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
 {
  public:
 
-  static MEDPresentationManager_i* getInstance();
-
-  MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&);
-  MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&);
-  MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&);
-  MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&);
-  MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&);
-  MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&);
-
-  MEDCALC_EXPORT void setPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue);
-  MEDCALC_EXPORT char* getPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName);
-
-  MEDCALC_EXPORT void updateScalarMap(MEDPresentation::TypeID presentationID, const MEDCALC::ScalarMapParameters&);
-  MEDCALC_EXPORT void updateContour(MEDPresentation::TypeID presentationID, const MEDCALC::ContourParameters&);
-  MEDCALC_EXPORT void updateVectorField(MEDPresentation::TypeID presentationID, const MEDCALC::VectorFieldParameters&);
-  MEDCALC_EXPORT void updateSlices(MEDPresentation::TypeID presentationID, const MEDCALC::SlicesParameters&);
-  MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters&);
-  MEDCALC_EXPORT void updatePointSprite(MEDPresentation::TypeID presentationID, const MEDCALC::PointSpriteParameters&);
-
-  MEDCALC_EXPORT CORBA::Boolean removePresentation(MEDPresentation::TypeID presentationID);
-
-  MEDCALC_EXPORT CORBA::Boolean activateView(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT static MEDPresentationManager_i* getInstance();
+
+  MEDCALC_EXPORT MEDPresentation::TypeID makeMeshView(const MEDCALC::MeshViewParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makePlot3D(const MEDCALC::Plot3DParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeStreamLines(const MEDCALC::StreamLinesParameters&, const MEDCALC::ViewModeType);
+  MEDCALC_EXPORT MEDPresentation::TypeID makeCutSegment(const MEDCALC::CutSegmentParameters&, const MEDCALC::ViewModeType);
+
+  MEDCALC_EXPORT void setPresentationStringProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue);
+  MEDCALC_EXPORT char* getPresentationStringProperty(MEDPresentation::TypeID presentationID, const char* propName);
+
+  MEDCALC_EXPORT void setPresentationIntProperty(MEDPresentation::TypeID presentationID, const char* propName, const CORBA::Long propValue);
+  MEDCALC_EXPORT CORBA::Long getPresentationIntProperty(MEDPresentation::TypeID presentationID, const char* propName);
+
+  MEDCALC_EXPORT void setPresentationDoubleProperty(MEDPresentation::TypeID presentationID, const char* propName, const CORBA::Double propValue);
+  MEDCALC_EXPORT CORBA::Double getPresentationDoubleProperty(MEDPresentation::TypeID presentationID, const char* propName);
+
+  MEDCALC_EXPORT MEDCALC::MeshViewParameters   getMeshViewParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::ScalarMapParameters* getScalarMapParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::ContourParameters*    getContourParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::SlicesParameters*    getSlicesParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::VectorFieldParameters*     getVectorFieldParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::PointSpriteParameters*    getPointSpriteParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::Plot3DParameters*         getPlot3DParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::DeflectionShapeParameters*     getDeflectionShapeParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::StreamLinesParameters*     getStreamLinesParameters(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::CutSegmentParameters*     getCutSegmentParameters(MEDPresentation::TypeID presentationID);
+
+  MEDCALC_EXPORT void updateMeshView(MEDPresentation::TypeID, const MEDCALC::MeshViewParameters&);
+  MEDCALC_EXPORT void updateScalarMap(MEDPresentation::TypeID, const MEDCALC::ScalarMapParameters&);
+  MEDCALC_EXPORT void updateContour(MEDPresentation::TypeID, const MEDCALC::ContourParameters&);
+  MEDCALC_EXPORT void updateVectorField(MEDPresentation::TypeID, const MEDCALC::VectorFieldParameters&);
+  MEDCALC_EXPORT void updateSlices(MEDPresentation::TypeID, const MEDCALC::SlicesParameters&);
+  MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID, const MEDCALC::DeflectionShapeParameters&);
+  MEDCALC_EXPORT void updatePointSprite(MEDPresentation::TypeID, const MEDCALC::PointSpriteParameters&);
+  MEDCALC_EXPORT void updatePlot3D(MEDPresentation::TypeID, const MEDCALC::Plot3DParameters&);
+  MEDCALC_EXPORT void updateStreamLines(MEDPresentation::TypeID, const MEDCALC::StreamLinesParameters&);
+  MEDCALC_EXPORT void updateCutSegment(MEDPresentation::TypeID, const MEDCALC::CutSegmentParameters&);
+
+  MEDCALC_EXPORT CORBA::Boolean removePresentation(MEDPresentation::TypeID);
+  MEDCALC_EXPORT CORBA::Boolean activateView(MEDPresentation::TypeID);
+  MEDCALC_EXPORT CORBA::Long getActiveViewPythonId();
+//  MEDCALC_EXPORT MEDCALC::ViewModeType getPresentationViewMode(MEDPresentation::TypeID);
+  MEDCALC_EXPORT char * getParavisDump(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT MEDCALC::PresentationsList* getAllPresentations();
+  MEDCALC_EXPORT void cleanUp();
+  MEDCALC_EXPORT MEDCALC::PresentationVisibility stateInActiveView(MEDPresentation::TypeID presentationID);
 
  private:
   MEDPresentationManager_i();
@@ -68,14 +98,17 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
 
   // Create a new presentation instance and return its unique ID
   template<typename PresentationType, typename PresentationParameters>
-  MEDPresentation::TypeID _makePresentation(PresentationParameters params);
+  MEDPresentation::TypeID _makePresentation(const PresentationParameters params, MEDCALC::ViewModeType viewMode);
 
   // Update presentation
   template<typename PresentationType, typename PresentationParameters>
-  void _updatePresentation(MEDPresentation::TypeID presentationID, PresentationParameters params);
+  void _updatePresentation(MEDPresentation::TypeID presentationID, const PresentationParameters params);
+
+  // Get presentation parameters
+  template<typename PresentationType, typename PresentationParameters>
+  void _getParameters(MEDPresentation::TypeID presentationID, PresentationParameters & params) const;
 
   MEDPresentation* _getPresentation(MEDPresentation::TypeID) const;
-  MEDPresentation::TypeID _getActivePresentationId() const;
 
  private :
 
@@ -86,6 +119,7 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
   // Owns a list of MEDPresentation objects
   std::map<MEDPresentation::TypeID, MEDPresentation*> _presentations;
 
+  long _activeViewPythonId;
 };
 
 #include "MEDPresentationManager_i.txx"