Salome HOME
Parameters annotation corrected.
[modules/hydro.git] / src / HYDROPy / HYDROData_Stream.sip
index 0fcd433c6b7e8c537a2f0022c1845ff310ad192e..07c05255dccddb6cc587e075cf7f488d87232be2 100644 (file)
@@ -34,7 +34,7 @@ public:
   /**
    * Update the shape presentations of stream.
    */
-  virtual void UpdatePrs();
+  void UpdatePrs();
 
   /**
    * Returns default filling color for new stream.
@@ -49,31 +49,18 @@ public:
   /**
    * Returns true if given polyline can be used as stream axis.
    */
-  static bool IsValidAsAxis( const Handle(HYDROData_PolylineXY)& theAxis );
-
-public:      
-  // Public methods to work with Stream presentation
-  
-  /**
-   * Returns the left edge of the stream.
-   */
-//  virtual TopoDS_Shape GetLeftShape() const;
-
-  /**
-   * Returns the right edge of the stream.
-   */
-//  virtual TopoDS_Shape GetRightShape() const;
-
-  /**
-   * Returns the inlet edge of the stream.
-   */
-//  virtual TopoDS_Shape GetInletShape() const;
-
-  /**
-   * Returns the outlet edge of the stream.
-   */
-//  virtual TopoDS_Shape GetOutletShape() const;
-
+  static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) 
+  [bool ( const Handle_HYDROData_PolylineXY& )];
+  %MethodCode
+    Handle(HYDROData_PolylineXY) aRef =
+      Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = HYDROData_Stream::IsValidAsAxis( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
 public:      
   // Public methods to work with Stream data fields
@@ -81,59 +68,84 @@ public:
   /**
    * Sets reference hydraulic axis object for stream.
    */
-  virtual bool SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis );
+  bool SetHydraulicAxis( HYDROData_PolylineXY theAxis )
+  [bool ( const Handle_HYDROData_PolylineXY& )];
+  %MethodCode
+    Handle(HYDROData_PolylineXY) aRef =
+      Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetHydraulicAxis( aRef ):
+                               sipCpp->SetHydraulicAxis( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns reference hydraulic axis object of stream.
    */
-  virtual Handle(HYDROData_PolylineXY) GetHydraulicAxis() const;
+  HYDROData_PolylineXY GetHydraulicAxis() const
+  [Handle_HYDROData_PolylineXY ()];
+  %MethodCode
+    Handle(HYDROData_PolylineXY) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() : 
+                           sipCpp->GetHydraulicAxis();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
+  %End
 
   /**
    * Remove reference hydraulic axis object from stream.
    */
-  virtual void RemoveHydraulicAxis();
-
-  /**
-   * Returns true if profile has the intersection with the given hydraulic axis.
-   * Returns the parameter of inresection point on axis if axis is presented by one curve,
-   * if axis presented by set of edges the <outPar> returns a common length of segments till the intersection point. 
-   */
-  static bool HasIntersection( const Handle(HYDROData_PolylineXY)& theHydAxis, 
-                                                const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
-                                                                                                                       Standard_Real& outPar);
-
-  /**
-   * Returns true if profile has the intersection with reference hydraulic axis.
-   * Returns the parameter of inresection point on axis if axis is presented by one curve,
-   * if axis presented by set of edges the <outPar> returns a common length of segments till the intersection point. 
-   */
-  virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
-                                                                                                                        Standard_Real& outPar) const;
-
-   /**
-   * Builds a planar face
-   */
-  virtual bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const;
+  void RemoveHydraulicAxis();
 
   /**
    * Add new one reference profile object for stream.
    */
-  virtual bool AddProfile( const Handle(HYDROData_Profile)& theProfile );
+  bool AddProfile( HYDROData_Profile theProfile )
+  [bool ( const Handle_HYDROData_Profile& )];
+  %MethodCode
+    Handle(HYDROData_Profile) aRef =
+      Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::AddProfile( aRef ):
+                               sipCpp->AddProfile( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns all reference profile objects of stream.
    */
-  virtual HYDROData_SequenceOfObjects GetProfiles() const;
+  HYDROData_SequenceOfObjects GetProfiles() const;
 
   /**
    * Removes reference profile object from stream.
    */
-  virtual bool RemoveProfile( const Handle(HYDROData_Profile)& theProfile );
+  bool RemoveProfile( HYDROData_Profile theProfile )
+  [bool ( const Handle_HYDROData_Profile& )];
+  %MethodCode
+    Handle(HYDROData_Profile) aRef =
+      Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::RemoveProfile( aRef ):
+                               sipCpp->RemoveProfile( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Removes all reference profile objects from stream.
    */
-  virtual void RemoveProfiles();
+  void RemoveProfiles();
   
 protected:
   /**