1 // Copyright (C) 2011-2015 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
19 // Authors: A Bruneton (CEA), C Aguerre (EdF)
21 #ifndef SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_
22 #define SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_
25 #include "MEDCALC.hxx"
27 #include <SALOMEconfig.h>
28 #include CORBA_SERVER_HEADER(MEDDataManager)
29 #include CORBA_SERVER_HEADER(MEDPresentationManager)
35 class MEDCALC_EXPORT MEDPresentation
37 friend class MEDPresentationManager_i;
41 virtual ~MEDPresentation() {}
43 void setProperty(const std::string& propName, const std::string& propValue);
44 const std::string getProperty(const std::string& propName);
45 std::string getFieldTypeString();
49 MEDPresentation(MEDCALC::FieldHandler* fieldHdl, std::string name);
51 void generatePipeline();
52 virtual void internalGeneratePipeline() = 0;
53 PyObject * getPythonObjectFromMain(const char * var);
54 void pushInternal(PyObject * obj, PyObject * disp = NULL);
58 ///! field reference - borrowed.
59 MEDCALC::FieldHandler* _fieldHandler;
61 ///! Pipeline elements
62 std::vector< PyObject * > _pipeline;
64 ///! Corresponding display object, if any:
65 std::vector< PyObject * > _display;
67 ///! Presentation properties <key,value>
68 std::map<std::string, std::string> _properties;
71 class MEDCALC_EXPORT MEDPresentationScalarMap : public MEDPresentation
74 MEDPresentationScalarMap(MEDCALC::FieldHandler* fieldHdl, bool wireframe) :
75 MEDPresentation(fieldHdl, "MEDPresentationScalarMap"),
76 _isWireframe(wireframe)
78 virtual ~MEDPresentationScalarMap() {}
81 virtual void internalGeneratePipeline();
87 #endif /* SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_ */