From adc4a589f37f55b01ab917954d195d7c325bdba3 Mon Sep 17 00:00:00 2001 From: rkv Date: Fri, 10 Jan 2014 08:30:46 +0000 Subject: [PATCH] SIP: HYDROData_AltitudeObject is included. --- CMake/UsePyQt4EXT.cmake | 3 ++ src/HYDROPy/CMakeLists.txt | 1 + src/HYDROPy/HYDROData.sip | 1 + src/HYDROPy/HYDROData_AltitudeObject.sip | 57 +++++++++++++++++++++++ src/HYDROPy/HYDROData_Document.sip | 4 +- src/HYDROPy/HYDROData_Entity.sip | 4 ++ src/HYDROPy/HYDROData_IAltitudeObject.sip | 4 +- 7 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 src/HYDROPy/HYDROData_AltitudeObject.sip diff --git a/CMake/UsePyQt4EXT.cmake b/CMake/UsePyQt4EXT.cmake index 50746cdc..0b32c356 100644 --- a/CMake/UsePyQt4EXT.cmake +++ b/CMake/UsePyQt4EXT.cmake @@ -67,6 +67,9 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IAltitudeObject.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IAltitudeObject.cc) + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_AltitudeObject.cc) + SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_AltitudeObject.cc) + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ObstacleAltitude.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ObstacleAltitude.cc) diff --git a/src/HYDROPy/CMakeLists.txt b/src/HYDROPy/CMakeLists.txt index f39075f7..8158f757 100644 --- a/src/HYDROPy/CMakeLists.txt +++ b/src/HYDROPy/CMakeLists.txt @@ -63,6 +63,7 @@ SET(_sip_files2 HYDROData_ShapesGroup.sip HYDROData_IPolyline.sip HYDROData_IAltitudeObject.sip + HYDROData_AltitudeObject.sip HYDROData_ObstacleAltitude.sip HYDROData_Object.sip HYDROData_Profile.sip diff --git a/src/HYDROPy/HYDROData.sip b/src/HYDROPy/HYDROData.sip index a0ec3a37..ad42417f 100644 --- a/src/HYDROPy/HYDROData.sip +++ b/src/HYDROPy/HYDROData.sip @@ -60,6 +60,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com %Include HYDROData_ShapesGroup.sip %Include HYDROData_IPolyline.sip %Include HYDROData_IAltitudeObject.sip +%Include HYDROData_AltitudeObject.sip %Include HYDROData_ObstacleAltitude.sip %Include HYDROData_Object.sip %Include HYDROData_Profile.sip diff --git a/src/HYDROPy/HYDROData_AltitudeObject.sip b/src/HYDROPy/HYDROData_AltitudeObject.sip new file mode 100644 index 00000000..bbab41f0 --- /dev/null +++ b/src/HYDROPy/HYDROData_AltitudeObject.sip @@ -0,0 +1,57 @@ +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +%ExportedHeaderCode +#include +%End + +class HYDROData_AltitudeObject : public HYDROData_IAltitudeObject +{ + +%TypeHeaderCode +#include +%End + +public: + + // Public methods to work with altitudes. + + /** + * Returns altitude for given point. + * \param thePoint the point to examine + * \return altitude value + */ + virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const; + +protected: + + /** + * Creates new object in the internal data structure. Use higher level objects + * to create objects with real content. + */ + HYDROData_AltitudeObject(); + + /** + * Destructs properties of the object and object itself, removes it from the document. + */ + ~HYDROData_AltitudeObject(); +}; diff --git a/src/HYDROPy/HYDROData_Document.sip b/src/HYDROPy/HYDROData_Document.sip index adfd9acd..e3b416f1 100644 --- a/src/HYDROPy/HYDROData_Document.sip +++ b/src/HYDROPy/HYDROData_Document.sip @@ -72,11 +72,11 @@ class HYDROData_Document aRes = new HYDROData_Bathymetry( *dynamic_cast( theObject ) ); break; } -/* case KIND_ALTITUDE: + case KIND_ALTITUDE: { aRes = new HYDROData_AltitudeObject( *dynamic_cast( theObject ) ); break; - }*/ + } case KIND_OBSTACLE_ALTITUDE: { aRes = new HYDROData_ObstacleAltitude( *dynamic_cast( theObject ) ); diff --git a/src/HYDROPy/HYDROData_Entity.sip b/src/HYDROPy/HYDROData_Entity.sip index c07ecc35..c94c6947 100644 --- a/src/HYDROPy/HYDROData_Entity.sip +++ b/src/HYDROPy/HYDROData_Entity.sip @@ -55,6 +55,10 @@ class HYDROData_Entity // HYDROData_Entity sub-classes provide a unique kind ID. switch ( sipCpp->GetKind() ) { + case KIND_ALTITUDE: + sipClass = sipClass_HYDROData_AltitudeObject; + break; + case KIND_IMAGE: sipClass = sipClass_HYDROData_Image; break; diff --git a/src/HYDROPy/HYDROData_IAltitudeObject.sip b/src/HYDROPy/HYDROData_IAltitudeObject.sip index 99cc265e..369bf408 100644 --- a/src/HYDROPy/HYDROData_IAltitudeObject.sip +++ b/src/HYDROPy/HYDROData_IAltitudeObject.sip @@ -38,9 +38,9 @@ class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/ sipClass = sipClass_HYDROData_ObstacleAltitude; break; -/* case KIND_ALTITUDE: + case KIND_ALTITUDE: sipClass = sipClass_HYDROData_AltitudeObject; - break;*/ + break; default: // We don't recognise the type. -- 2.39.2