]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SIP: HYDROData_Digue is included.
authorrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 06:45:29 +0000 (06:45 +0000)
committerrkv <rkv@opencascade.com>
Fri, 10 Jan 2014 06:45:29 +0000 (06:45 +0000)
CMake/UsePyQt4EXT.cmake
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 3ac815a218705925b0abfad13a503d1edf66275e..94d43d862bba32e3e103ea03fc3b6baa2074c272 100644 (file)
@@ -96,6 +96,9 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles)
 
     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_Digue.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Digue.cc)
  
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_PolylineXY.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_PolylineXY.cc)
index 6dc46a3dbe73c4fbd142f640ee8142ad13db5d59..47ac660db99b93eb47960141f6724067f3d89fa4 100644 (file)
@@ -97,6 +97,7 @@ SET(_sip_files2
   HYDROData_ArtificialObject.sip
   HYDROData_Obstacle.sip
   HYDROData_Channel.sip
+  HYDROData_Digue.sip
   HYDROData_NaturalObject.sip
   HYDROData_River.sip
   HYDROData_Image.sip
index e3146295f76f432eed6bd804508cd56eb10baf70..801d167446e8424809fe473cb6f3236d272429c0 100644 (file)
@@ -69,7 +69,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 %Include HYDROData_ArtificialObject.sip
 %Include HYDROData_Obstacle.sip
 %Include HYDROData_Channel.sip
-//Include HYDROData_Digue.sip
+%Include HYDROData_Digue.sip
 %Include HYDROData_NaturalObject.sip
 %Include HYDROData_River.sip
 //Include HYDROData_Stream.sip
index 084f730c37570a1b3cd595560f70af74be888f5e..cf51d909053b2284d208c469ffb18176f668695c 100644 (file)
@@ -39,11 +39,13 @@ class HYDROData_ArtificialObject : HYDROData_Object /Abstract/
         sipClass = sipClass_HYDROData_Obstacle;
         break;
 
+      case KIND_DIGUE:
+        sipClass = sipClass_HYDROData_Digue;
+        break;
+
       case KIND_CHANNEL:
-      {
         sipClass = sipClass_HYDROData_Channel;
         break;
-      }
       
       case KIND_UNKNOWN:
         sipClass = sipClass_HYDROData_ArtificialObject;
index 827d62efabbd4bb32117b0ff675c9ea4c614f594..724734b16e5674ac56c22bd7a000a806d2b3c3b5 100644 (file)
@@ -30,6 +30,24 @@ class HYDROData_Channel : public HYDROData_ArtificialObject
 #include "HYDROData_Channel.h"
 %End
 
+%ConvertToSubClassCode
+    // HYDROData_Channel sub-classes provide a unique kind ID.
+    switch ( sipCpp->GetKind() )
+    {
+      case KIND_DIGUE:
+        sipClass = sipClass_HYDROData_Digue;
+        break;
+
+      case KIND_UNKNOWN:
+        sipClass = sipClass_HYDROData_ArtificialObject;
+        break;
+
+      default:
+        // We don't recognise the type.
+        sipClass = NULL;
+    }
+%End
+
 public:
   /**
    * Returns default filling color for new channel.
index 182ec3ca15c996ed44bdb8229ef8769617eb07c0..16437bbae49349e7594eba69ebebc7be5c5f04d0 100644 (file)
@@ -127,6 +127,11 @@ class HYDROData_Document
         aRes = new HYDROData_Zone( *dynamic_cast<HYDROData_Zone*>( theObject ) );
         break;
       }
+      case KIND_DIGUE:
+      {
+        aRes = new HYDROData_Digue( *dynamic_cast<HYDROData_Digue*>( theObject ) );
+        break;
+      }
       case KIND_CHANNEL:
       {
         aRes = new HYDROData_Channel( *dynamic_cast<HYDROData_Channel*>( theObject ) );
index 856b29c02741bb01384ed9e63c5c4804780bb7c9..c5cf31d276cf4f7f2b4ce79f18080c77b4b5c45e 100644 (file)
@@ -79,6 +79,10 @@ class HYDROData_Entity
         sipClass = sipClass_HYDROData_ImmersibleZone;
         break;
         
+      case KIND_DIGUE:
+        sipClass = sipClass_HYDROData_Digue;
+        break;
+
       case KIND_CHANNEL:
         sipClass = sipClass_HYDROData_Channel;
         break;
index 5aa789692becc0b5d751a38234380d973c04f1ad..5a0057fff5deecdd21073806910e6abcc9ce22d3 100644 (file)
@@ -42,6 +42,10 @@ class HYDROData_Object : HYDROData_Entity /Abstract/
       sipClass = sipClass_HYDROData_ImmersibleZone;
       break;
 
+    case KIND_DIGUE:
+      sipClass = sipClass_HYDROData_Digue;
+      break;
+
     case KIND_CHANNEL:
       sipClass = sipClass_HYDROData_Channel;
       break;