Salome HOME
tests 1 to 7 OK, 8 and above failed
[modules/hydro.git] / src / HYDROPy / HYDROData_Zone.sip
index e70baae0e675e3027ea0f6e301355abc9089e74b..070354cd7262a66a1f079c6fb0ba54f4da2cc0b3 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,94 +36,106 @@ class HYDROData_Zone : HYDROData_Entity
     }
 %End
 
+%TypeHeaderCode
+#include <HYDROData_Zone.h>
+%End
+
+public:
+
+  // Enumeration of mergin types for conflict altitudes
+  enum MergeType
+  {
+    Merge_ZMIN,   // The minimum values
+    Merge_ZMAX,   // The maximum values
+    Merge_Object   // Only one altitude will be taken into account
+  };
+
 public:      
 
-  /**
-   * Returns number of geometry objects for zone.
-   */
-  int NbGeometryObjects() const;
+  void SetMergeType( const MergeType& theType );
+  MergeType GetMergeType() const;
 
-  /**
-   * dd new one geometry object for zone.
-   */
-  void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
+  void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude )
+  [void (const Handle_HYDROData_IAltitudeObject&)];
   %MethodCode
-
-    Handle(HYDROData_Object) aGeomObj =
-      Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
-    if ( !aGeomObj.IsNull() )
+    Handle(HYDROData_IAltitudeObject) aRefAltitude =
+      Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
+    if ( !aRefAltitude.IsNull() )
     {
       Py_BEGIN_ALLOW_THREADS
-      sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : 
-                      sipCpp->AddGeometryObject( aGeomObj );
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefAltitude ) : 
+                      sipCpp->SetMergeObject( aRefAltitude );
       Py_END_ALLOW_THREADS
     }
+  %End
 
+  HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
+  %MethodCode
+    Handle(HYDROData_IAltitudeObject) aRefAltitude;
+    Py_BEGIN_ALLOW_THREADS
+    Handle(HYDROData_Entity) aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : 
+                                                          sipCpp->GetMergeObject();
+       aRefAltitude = Handle(HYDROData_IAltitudeObject)::DownCast( aRefObject );
+    Py_END_ALLOW_THREADS
+    sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
   %End
 
-  /**
-   * Replace the geometry object for zone.
-   */
-  void SetGeometryObject( const int        theIndex, 
-                          HYDROData_Object theObject ) [void (const int, const Handle_HYDROData_Object&)];
+  void RemoveMergeAltitude();
   %MethodCode
+    Py_BEGIN_ALLOW_THREADS
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::RemoveMergeObject() : 
+                      sipCpp->RemoveMergeObject();
+    Py_END_ALLOW_THREADS
+  %End
 
-    Handle(HYDROData_Object) aGeomObj =
-      Handle(HYDROData_Object)::DownCast( createHandle( a1 ) );
-    if ( !aGeomObj.IsNull() )
+  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::SetGeometryObject( a0, aGeomObj ) : 
-                      sipCpp->SetGeometryObject( a0, aGeomObj );
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefObject ) : 
+                      sipCpp->SetMergeObject( aRefObject );
       Py_END_ALLOW_THREADS
     }
+  %End
 
+  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
 
-  /**
-   * Sets the geometry object for zone.
-   */
-  //void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
+  void RemoveMergeObject();
 
-  /**
-   * Returns geometry object of zone by index.
-   */
-  HYDROData_Object GetGeometryObject( const int theIndex ) const [Handle_HYDROData_Object (const int)];
+  void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
   %MethodCode
 
-    Handle(HYDROData_Object) aGeomObj;
-    
-    Py_BEGIN_ALLOW_THREADS
-    aGeomObj = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetGeometryObject( a0 ) : 
-                               sipCpp->GetGeometryObject( a0 );
-    Py_END_ALLOW_THREADS
-    
-    sipRes = (HYDROData_Object*)createPointer( aGeomObj );
-  
+    Handle(HYDROData_Entity) anObj =
+      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+    if ( !anObj.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipSelfWasArg ? sipCpp->HYDROData_Zone::AddObject( anObj ) : 
+                      sipCpp->AddObject( anObj );
+      Py_END_ALLOW_THREADS
+    }
+
   %End
 
-  /**
-   * Returns all geometry objects of zone.
-   */
-  //HYDROData_SequenceOfObjects GetGeometryObjects() const;
+  HYDROData_SequenceOfObjects GetObjects() const;
 
-  /**
-   * Removes all geometry objects from zone.
-   */
-  void RemoveGeometryObjects();
+  void RemoveObjects();
+  void SetInterpolator( HYDROData_IInterpolator* theInter );
+  HYDROData_IInterpolator* GetInterpolator() const;
 
 protected:
 
-  /**
-   * Creates new object in the internal data structure. Use higher level objects 
-   * to create objects with real content.
-   */
   HYDROData_Zone();
-
-  /**
-   * Destructs properties of the object and object itself, removes it from the document.
-   */
   ~HYDROData_Zone();
 };
-
-