]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SIP: HYDROData_Channel is included.
authorrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 06:22:59 +0000 (06:22 +0000)
committerrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 06:22:59 +0000 (06:22 +0000)
CMake/UsePyQt4EXT.cmake
src/HYDROData/HYDROData_Channel.h
src/HYDROPy/CMakeLists.txt
src/HYDROPy/HYDROData.sip
src/HYDROPy/HYDROData_ArtificialObject.sip
src/HYDROPy/HYDROData_Channel.sip
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_Object.sip

index 2055e4e7288289c242dd64afe196594f8e017619..3ac815a218705925b0abfad13a503d1edf66275e 100644 (file)
@@ -94,6 +94,9 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles)
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Obstacle.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Obstacle.cc)
 
+    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Channel.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Channel.cc)
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_PolylineXY.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_PolylineXY.cc)
 
index 269d0db906cd28fc19a4b6b1d1cfb4f21f19108f..72a4621e43cf7ad14bcd8f645dfa4d00489c3ed4 100644 (file)
@@ -124,7 +124,7 @@ protected:
    * Returns the type of child altitude object.
    * Reimplemented to create chanel altitude object.
    */
-  virtual ObjectKind getAltitudeObjectType() const;
+  HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const;
 
 protected:
 
index b5a3cc41cbfabe41d8f43ea72c65d817b1b2070c..6dc46a3dbe73c4fbd142f640ee8142ad13db5d59 100644 (file)
@@ -96,6 +96,7 @@ SET(_sip_files2
   HYDROData_PolylineXY.sip
   HYDROData_ArtificialObject.sip
   HYDROData_Obstacle.sip
+  HYDROData_Channel.sip
   HYDROData_NaturalObject.sip
   HYDROData_River.sip
   HYDROData_Image.sip
index 57525ea3962cbc05dad1910c63d3288192868acc..e3146295f76f432eed6bd804508cd56eb10baf70 100644 (file)
@@ -68,7 +68,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 %Include HYDROData_PolylineXY.sip
 %Include HYDROData_ArtificialObject.sip
 %Include HYDROData_Obstacle.sip
-//Include HYDROData_Channel.sip
+%Include HYDROData_Channel.sip
 //Include HYDROData_Digue.sip
 %Include HYDROData_NaturalObject.sip
 %Include HYDROData_River.sip
index 3172a7286b2a66d0dd10a1d07b887e6fa1dc2a04..084f730c37570a1b3cd595560f70af74be888f5e 100644 (file)
@@ -39,6 +39,12 @@ class HYDROData_ArtificialObject : HYDROData_Object /Abstract/
         sipClass = sipClass_HYDROData_Obstacle;
         break;
 
+      case KIND_CHANNEL:
+      {
+        sipClass = sipClass_HYDROData_Channel;
+        break;
+      }
+      
       case KIND_UNKNOWN:
         sipClass = sipClass_HYDROData_ArtificialObject;
         break;
index 6c81449e18eac4dc8f522b79168244527eadf93d..827d62efabbd4bb32117b0ff675c9ea4c614f594 100644 (file)
@@ -48,33 +48,79 @@ public:
   /**
    * Sets reference guide line object for channel.
    */
-  virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
+  bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
+  [bool ( const Handle_HYDROData_Polyline3D& )];
+  %MethodCode
+    Handle(HYDROData_Polyline3D) aRef =
+      Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ):
+                               sipCpp->SetGuideLine( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns reference guide line object of channel.
    */
-  virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
+  HYDROData_Polyline3D GetGuideLine() const
+  [Handle_HYDROData_Polyline3D ()];
+  %MethodCode
+    Handle(HYDROData_Polyline3D) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() : 
+                           sipCpp->GetGuideLine();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
+  %End
 
   /**
    * Remove reference guide line object from channel.
    */
-  virtual void RemoveGuideLine();
+  void RemoveGuideLine();
 
 
   /**
    * Sets reference profile object for channel.
    */
-  virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
+  bool SetProfile( 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_Channel::SetProfile( aRef ):
+                               sipCpp->SetProfile( aRef );
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Returns reference profile object of channel.
    */
-  virtual Handle(HYDROData_Profile) GetProfile() const;
+  HYDROData_Profile GetProfile() const
+  [Handle_HYDROData_Profile ()];
+  %MethodCode
+    Handle(HYDROData_Profile) aRef;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() : 
+                           sipCpp->GetProfile();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_Profile*)createPointer( aRef );
+  %End
 
   /**
    * Remove reference profile object from channel.
    */
-  virtual void RemoveProfile();
+  void RemoveProfile();
 
 
 protected:
index ca96f19da58306296fd61507922caffdb9ba7d96..182ec3ca15c996ed44bdb8229ef8769617eb07c0 100644 (file)
@@ -127,6 +127,11 @@ class HYDROData_Document
         aRes = new HYDROData_Zone( *dynamic_cast<HYDROData_Zone*>( theObject ) );
         break;
       }
+      case KIND_CHANNEL:
+      {
+        aRes = new HYDROData_Channel( *dynamic_cast<HYDROData_Channel*>( theObject ) );
+        break;
+      }
     }
     
     return aRes;
index 5371a05a94e9ec3dd4aaffd904e8b3ed32164fac..856b29c02741bb01384ed9e63c5c4804780bb7c9 100644 (file)
@@ -79,6 +79,10 @@ class HYDROData_Entity
         sipClass = sipClass_HYDROData_ImmersibleZone;
         break;
         
+      case KIND_CHANNEL:
+        sipClass = sipClass_HYDROData_Channel;
+        break;
+      
       case KIND_CALCULATION:
         sipClass = sipClass_HYDROData_CalculationCase;
         break;
index a8af933e3241ed983c47f4f006547fadbdf52cc5..5aa789692becc0b5d751a38234380d973c04f1ad 100644 (file)
@@ -42,6 +42,10 @@ class HYDROData_Object : HYDROData_Entity /Abstract/
       sipClass = sipClass_HYDROData_ImmersibleZone;
       break;
 
+    case KIND_CHANNEL:
+      sipClass = sipClass_HYDROData_Channel;
+      break;
+      
     case KIND_POLYLINE:
       sipClass = sipClass_HYDROData_Polyline3D;
       break;