]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Correction of subclass directive.
authoradv <adv@opencascade.com>
Thu, 26 Dec 2013 11:22:40 +0000 (11:22 +0000)
committeradv <adv@opencascade.com>
Thu, 26 Dec 2013 11:22:40 +0000 (11:22 +0000)
src/HYDROPy/HYDROData_Object.sip

index 0f128fb142466da9182e7aef6f138d24b840c01b..d9596eb9a1cc311602977f32f584c67a12c63ba8 100644 (file)
@@ -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: