Salome HOME
Ordering of model objects implementation.
[modules/hydro.git] / src / HYDROPy / HYDROData_IAltitudeObject.sip
index 99cc265eb7fd5f91486d295ca119834e16226734..a99cc9cc5e31bfabfc3a639f7f4747e6452e3cee 100644 (file)
@@ -24,7 +24,7 @@
 #include <HYDROData_IAltitudeObject.h>
 %End
 
-class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/
+class HYDROData_IAltitudeObject : public HYDROData_Entity /Abstract/
 {
 
 %ConvertToSubClassCode
@@ -38,10 +38,14 @@ class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/
         sipClass = sipClass_HYDROData_ObstacleAltitude;
         break;
 
-/*      case KIND_ALTITUDE:
+      case KIND_ALTITUDE:
         sipClass = sipClass_HYDROData_AltitudeObject;
-        break;*/
+        break;
       
+      case KIND_STREAM_ALTITUDE:
+        sipClass = sipClass_HYDROData_StreamAltitude;
+        break;
+
       default:
         // We don't recognise the type.
         sipClass = NULL;
@@ -59,8 +63,28 @@ public:
    * Returns altitude points list.
    * \return points list
    */
-  static double             GetInvalidAltitude();
+  static double GetInvalidAltitude();
+
+  /**
+   * Returns altitude for given point.
+   * \param thePoint the point to examine
+   * \return altitude value
+   */
+  virtual double GetAltitudeForPoint( const double theCoordX,
+                                      const double theCoordX ) const = 0 [double ( const gp_XY& )];
+  %MethodCode
+    gp_XY aPnt( a0, a1 );
+  
+    Py_BEGIN_ALLOW_THREADS
+    sipRes = sipCpp->GetAltitudeForPoint( aPnt );
+    Py_END_ALLOW_THREADS
+  %End
+  %VirtualCatcherCode
+    PyObject *sipResObj = sipCallMethod(0, sipMethod, "dd",a0.X(),a0.Y());
 
+    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "d", &sipRes);
+  %End
+  
 protected:
 
   /**