]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SIP: HYDROData_AltitudeObject is included.
authorrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 08:30:46 +0000 (08:30 +0000)
committerrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 08:30:46 +0000 (08:30 +0000)
CMake/UsePyQt4EXT.cmake
src/HYDROPy/CMakeLists.txt
src/HYDROPy/HYDROData.sip
src/HYDROPy/HYDROData_AltitudeObject.sip [new file with mode: 0644]
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_IAltitudeObject.sip

index 50746cdc9f7944f8cbc51f529b6729c7f66a2984..0b32c3565c548a7bcbc34465f967a48c844bfa12 100644 (file)
@@ -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)
 
index f39075f7fceee458602721cb178517cdab547210..8158f757464b723d24162d04c279fd9138f88739 100644 (file)
@@ -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
index a0ec3a37a510b71be198d912834af1ed5d7582a2..ad42417f3a9396091dddcc239206b0a2a4271d44 100644 (file)
@@ -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 (file)
index 0000000..bbab41f
--- /dev/null
@@ -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 <HYDROData_AltitudeObject.h>
+%End
+
+class HYDROData_AltitudeObject : public HYDROData_IAltitudeObject
+{
+
+%TypeHeaderCode
+#include <HYDROData_AltitudeObject.h>
+%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();
+};
index adfd9acdc101fe70e2a2f713415f7167d369ed2b..e3b416f1aa51c2daa00f0cba46fdeb2c89dca6c1 100644 (file)
@@ -72,11 +72,11 @@ class HYDROData_Document
         aRes = new HYDROData_Bathymetry( *dynamic_cast<HYDROData_Bathymetry*>( theObject ) );
         break;
       }
-/*      case KIND_ALTITUDE:
+      case KIND_ALTITUDE:
       {
         aRes = new HYDROData_AltitudeObject( *dynamic_cast<HYDROData_AltitudeObject*>( theObject ) );
         break;
-      }*/
+      }
       case KIND_OBSTACLE_ALTITUDE:
       {
         aRes = new HYDROData_ObstacleAltitude( *dynamic_cast<HYDROData_ObstacleAltitude*>( theObject ) );
index c07ecc35d01e3835395c90f382c58c7ebc1e960f..c94c694769cfb11dedb99cc9aa2097c1522c5bb8 100644 (file)
@@ -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;
index 99cc265eb7fd5f91486d295ca119834e16226734..369bf408e4621e5fa178afec858679a7fecfd1af 100644 (file)
@@ -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.