]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SIP: HYDROData_Profile is included.
authorrkv <rkv@opencascade.com>
Wed, 8 Jan 2014 09:11:40 +0000 (09:11 +0000)
committerrkv <rkv@opencascade.com>
Wed, 8 Jan 2014 09:11:40 +0000 (09:11 +0000)
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Profile.sip

index d1639754d66dde558418aa5860b2dd87cce5212c..a5c3872e0a3121427f177825eca2992fcd54d1f0 100644 (file)
@@ -72,11 +72,21 @@ class HYDROData_Document
         aRes = new HYDROData_Bathymetry( *dynamic_cast<HYDROData_Bathymetry*>( theObject ) );
         break;
       }
+      case KIND_OBSTACLE_ALTITUDE:
+      {
+        aRes = new HYDROData_ObstacleAltitude( *dynamic_cast<HYDROData_ObstacleAltitude*>( theObject ) );
+        break;
+      }
       case KIND_IMMERSIBLE_ZONE:
       {
         aRes = new HYDROData_ImmersibleZone( *dynamic_cast<HYDROData_ImmersibleZone*>( theObject ) );
         break;
       }
+      case KIND_PROFILE:
+      {
+        aRes = new HYDROData_Profile( *dynamic_cast<HYDROData_Profile*>( theObject ) );
+        break;
+      }
       case KIND_PROFILEUZ:
       {
         aRes = new HYDROData_ProfileUZ( *dynamic_cast<HYDROData_ProfileUZ*>( theObject ) );
index e25057b4a69038d6925c5aba701de423e21031a7..6b11c5942f31e2a169759fd7367a30341da60168 100644 (file)
@@ -175,24 +175,18 @@ public:
    * \param theFileName the path to file
    * \return \c number of successfully imported profiles
    */
-  /*static int ImportFromFile( HYDROData_Document theDoc,
+  static int ImportFromFile( HYDROData_Document theDoc,
                              const TCollection_AsciiString&    theFileName,
                              NCollection_Sequence<int>&        theBadProfilesIds )
-  [int ImportFromFile( const Handle(HYDROData_Document)& ,
-                              const TCollection_AsciiString&    ,
-                              NCollection_Sequence<int>&         )];
-  MethodCode
-    Handle(HYDROData_Document) aRef =
-      Handle(HYDROData_Document)::DownCast( createHandle( a0 ) );
-    if ( !aRef.IsNull() )
-    {
-      Py_BEGIN_ALLOW_THREADS
-      sipRes = sipSelfWasArg ? sipCpp->HYDROData_Profile::ImportFromFile( aRef, a1, a2 ):
-                               sipCpp->ImportFromFile( aRef, a1, a2 );
-      Py_END_ALLOW_THREADS
-    }
-  End
-*/
+  [int ( const Handle_HYDROData_Document& ,
+         const TCollection_AsciiString&    ,
+         NCollection_Sequence<int>&         )];
+  %MethodCode
+    Py_BEGIN_ALLOW_THREADS
+    sipRes = HYDROData_Profile::ImportFromFile( a0, *a1, a2 );
+    Py_END_ALLOW_THREADS
+  %End
+
   /**
    * Imports Profile data from file.
    * \param theFileName the path to file