Salome HOME
test Strickler
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.h
index 1780ca9c682f246a4734398b3972a4acd3b39e08..ad8a5609ff3f752824364c250de9c020e15d3bd1 100644 (file)
@@ -24,6 +24,7 @@
 #include <HYDROData_PriorityQueue.h>
 #include <HYDROData_Zone.h>
 #include <HYDROData_Warning.h>
+#include <vector>
 
 #ifdef WIN32
   #pragma warning ( disable: 4251 )
@@ -43,20 +44,16 @@ class gp_XY;
 
 class TopoDS_Shape;
 class TopoDS_Shell;
-class TopTools_ListOfShape;
-
-class Handle(HYDROData_Object);
-class Handle(HYDROData_Region);
-class Handle(HYDROData_Zone);
-class Handle(HYDROData_PolylineXY);
-class Handle(HYDROData_ShapesGroup);
-class Handle(HYDROData_SplitShapesGroup);
-class Handle(HYDROData_Document);
-class Handle(HYDROData_StricklerTable);
-class Handle(HYDROData_LandCoverMap);
-
-DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
 
+class HYDROData_Object;
+class HYDROData_Region;
+class HYDROData_Zone;
+class HYDROData_PolylineXY;
+class HYDROData_ShapesGroup;
+class HYDROData_SplitShapesGroup;
+class HYDROData_Document;
+class HYDROData_StricklerTable;
+class HYDROData_LandCoverMap;
 
 /**\class HYDROData_CalculationCase
  * \brief Calculation case is defined by selection of Geometry objects with or without �Zone of water�.
@@ -96,6 +93,7 @@ public:
     DataTag_CustomRules,               ///< custom rules
     DataTag_AssignmentMode,            ///< assignment mode
     DataTag_StricklerTable,            ///< reference Strickler table
+    DataTag_InterPoly,                 ///< intersection polyline
 
     DataTag_LandCover_Obsolete,                 ///< reference land covers
     DataTag_CustomLandCoverRules_Obsolete,      ///< custom rules for land covers priority
@@ -107,8 +105,7 @@ public:
   };
 
 public:
-
-  DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity);
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -274,6 +271,12 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemoveSplitGroups();
 
+  HYDRODATA_EXPORT virtual bool AddInterPoly( const Handle(HYDROData_PolylineXY)& theInterPolyline );
+
+  HYDRODATA_EXPORT virtual void RemoveInterPolyObject( const Handle(HYDROData_PolylineXY)& theInterPolyline );
+
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetInterPolyObjects() const;
+
   /**
    * Exports the calculation case data (shell and groups) to GEOM module.
    * \param theStudyId the id of the study where the GEOM module should be used for export
@@ -293,7 +296,8 @@ public:
   HYDRODATA_EXPORT virtual bool Export( GEOM::GEOM_Gen_var  theGeomEngine,
                                         SALOMEDS::Study_ptr theStudy,
                                         QString& theGeomObjEntry,
-                                        QString& theErrorMsg ) const;
+                                        QString& theErrorMsg,
+                                        QString& statMess) const;
 #endif
 
 public:      
@@ -333,6 +337,12 @@ public:
    */
   HYDRODATA_EXPORT double GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const;
 
+  HYDRODATA_EXPORT std::vector<double> GetStricklerCoefficientForPoints(const std::vector<gp_XY>& thePoints,
+                                                                        double DefValue,
+                                                                        bool UseMax ) const;
+
+  HYDRODATA_EXPORT std::vector<int> GetStricklerTypeForPoints( const std::vector<gp_XY>& thePoints ) const;
+
   /**
    * Returns altitudes for given points on given region.
    * \param thePoints the points to examine
@@ -428,7 +438,7 @@ private:
 #ifndef LIGHT_MODE
   bool Export( GEOM::GEOM_Gen_var                            theGeomEngine,
                SALOMEDS::Study_ptr                           theStudy,
-               const TopTools_ListOfShape&                   theFaces,
+               const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aFacesToName,
                const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
                QString& theGeomObjEntry ) const;
 #endif