Salome HOME
SIP: HYDROData_Polyline3D is included.
authorrkv <rkv@opencascade.com>
Wed, 8 Jan 2014 13:08:27 +0000 (13:08 +0000)
committerrkv <rkv@opencascade.com>
Wed, 8 Jan 2014 13:08:27 +0000 (13:08 +0000)
CMake/UsePyQt4EXT.cmake
src/HYDROPy/CMakeLists.txt
src/HYDROPy/HYDROData.sip
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_IAltitudeObject.sip
src/HYDROPy/HYDROData_Object.sip
src/HYDROPy/HYDROData_Polyline3D.sip
src/HYDROPy/HYDROData_Profile.sip

index 76a77962fb3c82096cdfb953c6a63389b46bf79d..2055e4e7288289c242dd64afe196594f8e017619 100644 (file)
@@ -88,6 +88,9 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles)
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Profile.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Profile.cc)
 
+    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Polyline3D.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Polyline3D.cc)
+
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Obstacle.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Obstacle.cc)
 
index 19bcb5d22d3d5fee3df79cfd50110d064a82e551..b5a3cc41cbfabe41d8f43ea72c65d817b1b2070c 100644 (file)
@@ -91,6 +91,7 @@ SET(_sip_files2
   HYDROData_ObstacleAltitude.sip
   HYDROData_Object.sip
   HYDROData_Profile.sip
+  HYDROData_Polyline3D.sip
   HYDROData_ProfileUZ.sip
   HYDROData_PolylineXY.sip
   HYDROData_ArtificialObject.sip
index 0f463874b33c458f68fa0320e59e5fbab7a355e7..57525ea3962cbc05dad1910c63d3288192868acc 100644 (file)
@@ -63,7 +63,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 %Include HYDROData_ObstacleAltitude.sip
 %Include HYDROData_Object.sip
 %Include HYDROData_Profile.sip
-//Include HYDROData_Polyline3D.sip
+%Include HYDROData_Polyline3D.sip
 %Include HYDROData_ProfileUZ.sip
 %Include HYDROData_PolylineXY.sip
 %Include HYDROData_ArtificialObject.sip
index a5c3872e0a3121427f177825eca2992fcd54d1f0..ca96f19da58306296fd61507922caffdb9ba7d96 100644 (file)
@@ -72,6 +72,11 @@ class HYDROData_Document
         aRes = new HYDROData_Bathymetry( *dynamic_cast<HYDROData_Bathymetry*>( theObject ) );
         break;
       }
+/*      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 ) );
@@ -82,6 +87,11 @@ class HYDROData_Document
         aRes = new HYDROData_ImmersibleZone( *dynamic_cast<HYDROData_ImmersibleZone*>( theObject ) );
         break;
       }
+      case KIND_POLYLINE:
+      {
+        aRes = new HYDROData_Polyline3D( *dynamic_cast<HYDROData_Polyline3D*>( theObject ) );
+        break;
+      }
       case KIND_PROFILE:
       {
         aRes = new HYDROData_Profile( *dynamic_cast<HYDROData_Profile*>( theObject ) );
index f5b75504d82f368aa824f77125b3b9c27b530932..c216fb944277061e659010c75b26bc9176b847ad 100644 (file)
@@ -63,6 +63,10 @@ class HYDROData_Entity
         sipClass = sipClass_HYDROData_PolylineXY;
         break;
 
+      case KIND_PROFILEUZ:
+        sipClass = sipClass_HYDROData_ProfileUZ;
+        break;
+
       case KIND_BATHYMETRY:
         sipClass = sipClass_HYDROData_Bathymetry;
         break;
@@ -83,6 +87,10 @@ class HYDROData_Entity
         sipClass = sipClass_HYDROData_Obstacle;
         break;
 
+      case KIND_POLYLINE:
+        sipClass = sipClass_HYDROData_Polyline3D;
+        break;
+
       case KIND_PROFILE:
         sipClass = sipClass_HYDROData_Profile;
         break;
index 66c176ae51e13e479d07d3122dce0a02243c19b2..99cc265eb7fd5f91486d295ca119834e16226734 100644 (file)
@@ -38,6 +38,10 @@ class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/
         sipClass = sipClass_HYDROData_ObstacleAltitude;
         break;
 
+/*      case KIND_ALTITUDE:
+        sipClass = sipClass_HYDROData_AltitudeObject;
+        break;*/
+      
       default:
         // We don't recognise the type.
         sipClass = NULL;
index a451938aacfa557363a31a338ec3aa8b4582e190..a8af933e3241ed983c47f4f006547fadbdf52cc5 100644 (file)
@@ -42,6 +42,10 @@ class HYDROData_Object : HYDROData_Entity /Abstract/
       sipClass = sipClass_HYDROData_ImmersibleZone;
       break;
 
+    case KIND_POLYLINE:
+      sipClass = sipClass_HYDROData_Polyline3D;
+      break;
+
     case KIND_PROFILE:
       sipClass = sipClass_HYDROData_Profile;
       break;
index a690c3bb9f64eec7c5548d8837bfd387e5d9b46c..a9e2e63d2f052836e07da300ad8fc9079185423a 100644 (file)
@@ -48,29 +48,76 @@ public:
   /**
    * Sets reference x,y polyline object for 3D polyline.
    */
-  virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline,
-                              const bool theIsUpdateProfile = true );
+  bool SetPolylineXY( HYDROData_PolylineXY thePolyline,
+                              const bool theIsUpdateProfile = true )
+  [bool ( const Handle_HYDROData_PolylineXY&,
+          const bool = true )];
+  %MethodCode
+    Handle(HYDROData_PolylineXY) aRef =
+      Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetPolylineXY( aRef, a1 ):
+                               sipCpp->SetPolylineXY( aRef, a1 );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns reference x,y polyline object of 3D polyline.
    */
-  virtual Handle(HYDROData_PolylineXY) GetPolylineXY() const;
+  HYDROData_PolylineXY GetPolylineXY() const
+  [Handle_HYDROData_PolylineXY ()];
+  %MethodCode
+    Handle(HYDROData_PolylineXY) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetPolylineXY() : 
+                           sipCpp->GetPolylineXY();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
+  %End
 
   /**
    * Remove reference x,y polyline object from 3D polyline.
    */
-  virtual void RemovePolylineXY();
+  void RemovePolylineXY();
 
 
   /**
    * Sets reference u,z profile object for 3D polyline.
    */
-  virtual bool SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile );
+  bool SetProfileUZ( HYDROData_ProfileUZ theProfile )
+  [bool ( const Handle_HYDROData_ProfileUZ& )];
+  %MethodCode
+    Handle(HYDROData_ProfileUZ) aRef =
+      Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetProfileUZ( aRef ):
+                               sipCpp->SetProfileUZ( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns reference u,z profile object of 3D polyline.
    */
-  virtual Handle(HYDROData_ProfileUZ) GetProfileUZ() const;
+  HYDROData_ProfileUZ GetProfileUZ() const
+  [Handle_HYDROData_ProfileUZ ()];
+  %MethodCode
+    Handle(HYDROData_ProfileUZ) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetProfileUZ() : 
+                           sipCpp->GetProfileUZ();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
+  %End
 
   /**
    * Remove reference u,z profile object from 3D polyline.
@@ -82,19 +129,42 @@ public:
    * Set reference bathymetry object for geometry object.
    * Reimplemented to remove reference u,z profile.
    */
-  virtual bool SetAltitudeObject( const Handle(HYDROData_IAltitudeObject)& theAltitude );
+  bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
+  [bool ( const Handle_HYDROData_IAltitudeObject& )];
+  %MethodCode
+    Handle(HYDROData_IAltitudeObject) aRef =
+      Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetAltitudeObject( aRef ):
+                               sipCpp->SetAltitudeObject( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Clear the reference bathymetry object for geometry object.
    * Reimplemented to remove child u,z profile.
    */
-  virtual void RemoveAltitudeObject();
+  void RemoveAltitudeObject();
 
 
   /**
    * Returns the child u,z profile which has been generated from bathymetry.
    */
-  Handle(HYDROData_ProfileUZ) GetChildProfileUZ( const bool theIsCreate = true ) const;
+  HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const
+  [Handle_HYDROData_ProfileUZ ( const bool = true )];
+  %MethodCode
+    Handle(HYDROData_ProfileUZ) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetChildProfileUZ( a0 ) : 
+                           sipCpp->GetChildProfileUZ( a0 );
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
+  %End
 
 
 protected:
index 6b11c5942f31e2a169759fd7367a30341da60168..d94a1c9d9480df897513e8fdd544f52b65b36478 100644 (file)
@@ -175,7 +175,7 @@ public:
    * \param theFileName the path to file
    * \return \c number of successfully imported profiles
    */
-  static int ImportFromFile( HYDROData_Document theDoc,
+  static int ImportFromFile( const HYDROData_Document theDoc,
                              const TCollection_AsciiString&    theFileName,
                              NCollection_Sequence<int>&        theBadProfilesIds )
   [int ( const Handle_HYDROData_Document& ,