Salome HOME
copyrights in HYDRO files are updated
[modules/hydro.git] / src / HYDROPy / HYDROData_CalculationCase.sip
index 48a257f9c9a568a55d9a52c999fb98d4a72d4d75..e50f6850067038ec354179978e574457d15aed83 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  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
@@ -6,7 +6,7 @@
 // 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
 
 %ExportedHeaderCode
 #include <HYDROData_CalculationCase.h>
+#include <HYDROData_PriorityQueue.h>
 %End
 
+enum HYDROData_PriorityType
+{
+  LESS,
+  GREATER,
+};
+
 class HYDROData_CalculationCase : public HYDROData_Entity
 {
 
@@ -53,6 +60,12 @@ public:
     POINT_ON    ///< point is on the edge of zone face
   };
 
+  enum AssignmentMode
+  {
+    MANUAL = 0,
+    AUTOMATIC,
+  };
+
 public:      
   /**
    * Add new one reference geometry object for calculation case.
@@ -280,6 +293,8 @@ public:
    */
 //TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine,
 //                       SALOMEDS::Study_ptr theStudy );
+       
+       QString Export( int theStudyId ) const;
 
 public:      
   // Public methods to work with Calculation services
@@ -472,6 +487,31 @@ public:
     Py_END_ALLOW_THREADS
   %End
 
+
+  void ClearRules();
+
+  void AddRule( HYDROData_Object                   theObject1,
+                HYDROData_PriorityType             thePriority,
+                HYDROData_Object                   theObject2,
+                HYDROData_Zone::MergeAltitudesType theMergeType )
+  [void ( const Handle_HYDROData_Object&, HYDROData_PriorityType, const Handle_HYDROData_Object&, HYDROData_Zone::MergeAltitudesType )];
+  %MethodCode
+    Handle(HYDROData_Object) anObject1 =
+      Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
+    Handle(HYDROData_Object) anObject2 =
+      Handle(HYDROData_Object)::DownCast( createHandle( a2 ) );
+
+    Py_BEGIN_ALLOW_THREADS
+    sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3 ) : 
+                    sipCpp->AddRule( anObject1, a1, anObject2, a3 );
+    Py_END_ALLOW_THREADS
+  %End
+
+  QString DumpRules();
+
+  void SetAssignmentMode( AssignmentMode theMode );
+  AssignmentMode GetAssignmentMode() const;
+
 protected:
 
   /**