Salome HOME
Fix for the bug #37: Error when import image with format not supported.
[modules/hydro.git] / src / HYDROPy / HYDROData_Document.sip
index 4c2bfae199b2f2e65a7558fbde89b2a2a0c6ce68..539d91cb03d7c3ca93faf1fac213067b6fb7d2f1 100644 (file)
@@ -25,9 +25,9 @@
 %End
 
 %ModuleHeaderCode
-HYDROData_Object* copyObject( HYDROData_Object* theObject );
-Handle(HYDROData_Object) createHandle( HYDROData_Object* theObject );
-HYDROData_Object* createPointer( const Handle(HYDROData_Object)& theObject );
+HYDROData_Entity* copyObject( HYDROData_Entity* theObject );
+Handle(HYDROData_Entity) createHandle( HYDROData_Entity* theObject );
+HYDROData_Entity* createPointer( const Handle(HYDROData_Entity)& theObject );
 %End
 
 enum Data_DocError {
@@ -54,9 +54,9 @@ class HYDROData_Document
 
 %TypeCode
 
-  HYDROData_Object* copyObject( HYDROData_Object* theObject )
+  HYDROData_Entity* copyObject( HYDROData_Entity* theObject )
   {
-    HYDROData_Object* aRes = NULL;
+    HYDROData_Entity* aRes = NULL;
     if ( theObject == NULL )
       return aRes;
 
@@ -77,20 +77,40 @@ class HYDROData_Document
         aRes = new HYDROData_Bathymetry( *dynamic_cast<HYDROData_Bathymetry*>( theObject ) );
         break;
       }
+      case KIND_IMMERSIBLE_ZONE:
+      {
+        aRes = new HYDROData_ImmersibleZone( *dynamic_cast<HYDROData_ImmersibleZone*>( theObject ) );
+        break;
+      }
+      case KIND_CALCULATION:
+      {
+        aRes = new HYDROData_Calculation( *dynamic_cast<HYDROData_Calculation*>( theObject ) );
+        break;
+      }
+      case KIND_REGION:
+      {
+        aRes = new HYDROData_Region( *dynamic_cast<HYDROData_Region*>( theObject ) );
+        break;
+      }
+      case KIND_ZONE:
+      {
+        aRes = new HYDROData_Zone( *dynamic_cast<HYDROData_Zone*>( theObject ) );
+        break;
+      }
     }
     
     return aRes;
   }
   
-  Handle(HYDROData_Object) createHandle( HYDROData_Object* theObject )
+  Handle(HYDROData_Entity) createHandle( HYDROData_Entity* theObject )
   {
-    Handle(HYDROData_Object) aRes = copyObject( theObject );
+    Handle(HYDROData_Entity) aRes = copyObject( theObject );
     return aRes;
   }
   
-  HYDROData_Object* createPointer( const Handle(HYDROData_Object)& theObject )
+  HYDROData_Entity* createPointer( const Handle(HYDROData_Entity)& theObject )
   {
-    HYDROData_Object* aRes = NULL;
+    HYDROData_Entity* aRes = NULL;
     
     if ( !theObject.IsNull() )
       aRes = copyObject( theObject.operator->() );
@@ -177,10 +197,10 @@ public:
   //! Creates and locates in the document a new object
   //! \param theKind kind of the created object, can not be UNKNOWN
   //! \returns the created object
-  HYDROData_Object CreateObject( const ObjectKind theKind ) [Handle_HYDROData_Object (const ObjectKind)] ;
+  HYDROData_Entity CreateObject( const ObjectKind theKind ) [Handle_HYDROData_Entity (const ObjectKind)] ;
   %MethodCode
 
-    Handle(HYDROData_Object) anObject;
+    Handle(HYDROData_Entity) anObject;
     Py_BEGIN_ALLOW_THREADS
     anObject =  sipSelfWasArg ? sipCpp->HYDROData_Document::CreateObject( a0 ) :
                                 sipCpp->CreateObject( a0 );