From dd18f623821ffdf422b2ba4452024105953f7e8a Mon Sep 17 00:00:00 2001 From: rkv Date: Fri, 10 Jan 2014 06:45:29 +0000 Subject: [PATCH] SIP: HYDROData_Digue is included. --- CMake/UsePyQt4EXT.cmake | 3 +++ src/HYDROPy/CMakeLists.txt | 1 + src/HYDROPy/HYDROData.sip | 2 +- src/HYDROPy/HYDROData_ArtificialObject.sip | 6 ++++-- src/HYDROPy/HYDROData_Channel.sip | 18 ++++++++++++++++++ src/HYDROPy/HYDROData_Document.sip | 5 +++++ src/HYDROPy/HYDROData_Entity.sip | 4 ++++ src/HYDROPy/HYDROData_Object.sip | 4 ++++ 8 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CMake/UsePyQt4EXT.cmake b/CMake/UsePyQt4EXT.cmake index 3ac815a2..94d43d86 100644 --- a/CMake/UsePyQt4EXT.cmake +++ b/CMake/UsePyQt4EXT.cmake @@ -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) diff --git a/src/HYDROPy/CMakeLists.txt b/src/HYDROPy/CMakeLists.txt index 6dc46a3d..47ac660d 100644 --- a/src/HYDROPy/CMakeLists.txt +++ b/src/HYDROPy/CMakeLists.txt @@ -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 diff --git a/src/HYDROPy/HYDROData.sip b/src/HYDROPy/HYDROData.sip index e3146295..801d1674 100644 --- a/src/HYDROPy/HYDROData.sip +++ b/src/HYDROPy/HYDROData.sip @@ -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 diff --git a/src/HYDROPy/HYDROData_ArtificialObject.sip b/src/HYDROPy/HYDROData_ArtificialObject.sip index 084f730c..cf51d909 100644 --- a/src/HYDROPy/HYDROData_ArtificialObject.sip +++ b/src/HYDROPy/HYDROData_ArtificialObject.sip @@ -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; diff --git a/src/HYDROPy/HYDROData_Channel.sip b/src/HYDROPy/HYDROData_Channel.sip index 827d62ef..724734b1 100644 --- a/src/HYDROPy/HYDROData_Channel.sip +++ b/src/HYDROPy/HYDROData_Channel.sip @@ -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. diff --git a/src/HYDROPy/HYDROData_Document.sip b/src/HYDROPy/HYDROData_Document.sip index 182ec3ca..16437bba 100644 --- a/src/HYDROPy/HYDROData_Document.sip +++ b/src/HYDROPy/HYDROData_Document.sip @@ -127,6 +127,11 @@ class HYDROData_Document aRes = new HYDROData_Zone( *dynamic_cast( theObject ) ); break; } + case KIND_DIGUE: + { + aRes = new HYDROData_Digue( *dynamic_cast( theObject ) ); + break; + } case KIND_CHANNEL: { aRes = new HYDROData_Channel( *dynamic_cast( theObject ) ); diff --git a/src/HYDROPy/HYDROData_Entity.sip b/src/HYDROPy/HYDROData_Entity.sip index 856b29c0..c5cf31d2 100644 --- a/src/HYDROPy/HYDROData_Entity.sip +++ b/src/HYDROPy/HYDROData_Entity.sip @@ -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; diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 5aa78969..5a0057ff 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -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; -- 2.39.2