From: adv Date: Thu, 26 Dec 2013 11:22:40 +0000 (+0000) Subject: Correction of subclass directive. X-Git-Tag: BR_hydro_v_0_7~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4040c8541d3aada065d023b314e764a58380db48;p=modules%2Fhydro.git Correction of subclass directive. --- diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 0f128fb1..d9596eb9 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -31,28 +31,25 @@ class HYDROData_Object : HYDROData_Entity /Abstract/ %End %ConvertToSubClassCode - if ( !Handle(HYDROData_ArtificialObject)::DownCast( sipCpp ).IsNull() ) - sipClass = sipClass_HYDROData_ArtificialObject; - else if ( !Handle(HYDROData_NaturalObject)::DownCast( sipCpp ).IsNull() ) - sipClass = sipClass_HYDROData_NaturalObject; - else - { - // HYDROData_Object sub-classes provide a unique kind ID. - switch ( sipCpp->GetKind() ) - { - case KIND_OBSTACLE: - sipClass = sipClass_HYDROData_Obstacle; - break; - - case KIND_UNKNOWN: - sipClass = sipClass_HYDROData_Object; - break; - - default: - // We don't recognise the type. - sipClass = NULL; - } - } + // HYDROData_Object sub-classes provide a unique kind ID. + switch ( sipCpp->GetKind() ) + { + case KIND_OBSTACLE: + sipClass = sipClass_HYDROData_Obstacle; + break; + + case KIND_IMMERSIBLE_ZONE: + sipClass = sipClass_HYDROData_ImmersibleZone; + break; + + case KIND_UNKNOWN: + sipClass = sipClass_HYDROData_Entity; + break; + + default: + // We don't recognise the type. + sipClass = NULL; + } %End public: