Salome HOME
Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into...
[modules/hydro.git] / src / HYDROPy / HYDROData_Zone.sip
index 4b28e6d8451b06d6c5b8ac9585623294ac6cda57..31e1dd2c711ba9d9431615a83a4f34edcbbf6437 100644 (file)
@@ -1,12 +1,8 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include <HYDROData_Zone.h>
 %End
 
-class HYDROData_Zone : HYDROData_Entity
+class HYDROData_Zone : public HYDROData_Entity
 {
 
-%TypeHeaderCode
-#include <HYDROData_Zone.h>
-%End
-
 %ConvertToSubClassCode
     switch ( sipCpp->GetKind() )
     {
@@ -44,99 +36,166 @@ class HYDROData_Zone : HYDROData_Entity
     }
 %End
 
+%TypeHeaderCode
+#include <HYDROData_Zone.h>
+%End
+
 public:
 
-  // Enumeration of mergin types for conflict bathymetries
-  enum MergeBathymetriesType
+  // Enumeration of mergin types for conflict altitudes
+  enum MergeType
   {
     Merge_ZMIN,   // The minimum values
     Merge_ZMAX,   // The maximum values
-    Merge_Object  // Only one bathymetry will be taken into account
+    Merge_Object   // Only one altitude will be taken into account
   };
 
 public:      
 
   /**
-   * Sets the merging type for conflict bathymetries.
+   * Sets the merging type for conflict altitudes.
    * By default it is set to Merge_ZMIN.
    */
-  void SetMergeType( const MergeBathymetriesType& theType );
+  void SetMergeType( const MergeType& theType );
 
   /**
-   * Returns the merging type for conflict bathymetries.
+   * Returns the merging type for conflict altitudes.
    */
-  MergeBathymetriesType GetMergeType() const;
+  MergeType GetMergeType() const;
 
 
   /**
-   * Sets the reference bathymetry to resolve the conflict.
+   * Sets the reference altitude to resolve the conflict.
    * This object is used only in case of "Merge_Object" merge type.
    */
-  void SetMergeBathymetry( HYDROData_Bathymetry theBathymetry ) [void (const Handle_HYDROData_Bathymetry&)];
+  void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)];
   %MethodCode
 
-    Handle(HYDROData_Bathymetry) aRefBath =
-      Handle(HYDROData_Bathymetry)::DownCast( createHandle( a0 ) );
-    if ( !aRefBath.IsNull() )
+    Handle(HYDROData_IAltitudeObject) aRefAltitude =
+      Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
+    if ( !aRefAltitude.IsNull() )
     {
       Py_BEGIN_ALLOW_THREADS
-      sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeBathymetry( aRefBath ) : 
-                      sipCpp->SetMergeBathymetry( aRefBath );
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefAltitude ) : 
+                      sipCpp->SetMergeObject( aRefAltitude );
       Py_END_ALLOW_THREADS
     }
 
   %End
 
   /**
-   * Returns the reference bathymetry to resolve the conflict.
+   * Returns the reference altitude to resolve the conflict.
    */
-  HYDROData_Bathymetry GetMergeBathymetry() const [Handle_HYDROData_Bathymetry ()];
+  HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
   %MethodCode
 
-    Handle(HYDROData_Bathymetry) aRefBath;
+    Handle(HYDROData_IAltitudeObject) aRefAltitude;
     
     Py_BEGIN_ALLOW_THREADS
-    aRefBath = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeBathymetry() : 
-                               sipCpp->GetMergeBathymetry();
+    Handle(HYDROData_Entity) aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : 
+                                                          sipCpp->GetMergeObject();
+       aRefAltitude = Handle(HYDROData_IAltitudeObject)::DownCast( aRefObject );
     Py_END_ALLOW_THREADS
     
-    sipRes = (HYDROData_Bathymetry*)createPointer( aRefBath );
+    sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
   
   %End
 
   /**
-   * Removes the reference bathymetry for resolving the conflict.
+   * Removes the reference altitude for resolving the conflict.
+   */
+  void RemoveMergeAltitude();
+  %MethodCode
+
+    Py_BEGIN_ALLOW_THREADS
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::RemoveMergeObject() : 
+                      sipCpp->RemoveMergeObject();
+    Py_END_ALLOW_THREADS
+
+  %End
+
+  /**
+   * Sets the reference object to resolve the conflict.
+   * This object is used only in case of "Merge_Object" merge type.
+   */
+  void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
+  %MethodCode
+
+    Handle(HYDROData_Entity) aRefObject =
+      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+    if ( !aRefObject.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefObject ) : 
+                      sipCpp->SetMergeObject( aRefObject );
+      Py_END_ALLOW_THREADS
+    }
+
+  %End
+
+  /**
+   * Returns the reference object to resolve the conflict.
    */
-  void RemoveMergeBathymetry();
+  HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()];
+  %MethodCode
+
+    Handle(HYDROData_Entity) aRefObject;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : 
+                                 sipCpp->GetMergeObject();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = (HYDROData_Entity*)createPointer( aRefObject );
+  
+  %End
 
+  /**
+   * Removes the reference object for resolving the conflict.
+   */
+  void RemoveMergeObject();
 
   /**
-   * dd new one geometry object for zone.
+   * Add new one object for zone.
    */
-  void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
+  void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
   %MethodCode
 
-    Handle(HYDROData_Object) aGeomObj =
-      Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
-    if ( !aGeomObj.IsNull() )
+    Handle(HYDROData_Entity) anObj =
+      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+    if ( !anObj.IsNull() )
     {
       Py_BEGIN_ALLOW_THREADS
-      sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : 
-                      sipCpp->AddGeometryObject( aGeomObj );
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::AddObject( anObj ) : 
+                      sipCpp->AddObject( anObj );
       Py_END_ALLOW_THREADS
     }
 
   %End
 
   /**
-   * Returns all geometry objects of zone.
+   * Returns all objects of zone.
+   */
+  HYDROData_SequenceOfObjects GetObjects() const;
+
+  /**
+   * Removes all objects from zone.
+   */
+  void RemoveObjects();
+
+
+  /**
+   * Sets the interpolator for zone. By default it is NULL and original
+   * interpolation algorithms are used to calculate points altitudes.
+   * If you set interpolator it won't be stored in the data model structure,
+   * it will be deleted during that time as this zone will be freed.
    */
-  //HYDROData_SequenceOfObjects GetGeometryObjects() const;
+  void SetInterpolator( HYDROData_IInterpolator* theInter );
 
   /**
-   * Removes all geometry objects from zone.
+   * * Returns the interpolator of zone object.
    */
-  void RemoveGeometryObjects();
+  HYDROData_IInterpolator* GetInterpolator() const;
 
 protected: