Salome HOME
Bug #490: batch mode error.
[modules/hydro.git] / src / HYDROData / HYDROData_SplitToZonesTool.h
index 28413ef7ca122a4c7e41129b142efbcb3a4fba9d..67b6bdc046c4276066f7afde90c4218172b38928 100644 (file)
@@ -3,9 +3,14 @@
 #define HYDROData_SplitToZonesTool_H
 
 #include <HYDROData_Object.h>
-
+#include <HYDROData_Transform.h>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Compound.hxx>
 #include <TopoDS_Face.hxx>
-
+#include <TopTools_ShapeMapHasher.hxx>
+#include <NCollection_IndexedMap.hxx>
+#include <NCollection_IndexedDataMap.hxx>
+#include <TopTools_ListOfShape.hxx>
 #include <QStringList>
 
 class Handle(HYDROData_PolylineXY);
@@ -48,7 +53,14 @@ public:
   };
 
   typedef QList        <SplitData> SplitDataList;
-  typedef QListIterator<SplitData> SplitDataListIterator;
+  typedef QListIterator<SplitData> SplitDataListIterator;  
+  typedef NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher> HYDROData_MapOfShape;
+  typedef HYDROData_MapOfShape::Iterator HYDROData_MapIteratorOfMapOfShape;
+  typedef NCollection_IndexedDataMap<TopoDS_Shape, TopTools_ListOfShape, TopTools_ShapeMapHasher> HYDROData_DataMapOfShapeListOfShape;
+  typedef HYDROData_DataMapOfShapeListOfShape::Iterator HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape;
+  typedef NCollection_IndexedDataMap<TopoDS_Shape,  QStringList, TopTools_ShapeMapHasher> HYDROData_DataMapOfShapeListOfString;
+  typedef HYDROData_DataMapOfShapeListOfString::Iterator HYDROData_DataMapIteratorOfDataMapOfShapeListOfString;
+  #undef _NCollection_MapHasher
 
 public:
 
@@ -56,16 +68,14 @@ public:
                                     const HYDROData_SequenceOfObjects&  theGroupsList,
                                     const Handle(HYDROData_PolylineXY)& thePolyline );
 
-private:
+  static void SetFileNames(const QString& theNameBefore, const QString& theNameAfter);
 
-  static bool                SplitTwoData( const SplitData& theData1,
-                                           const SplitData& theData2,
-                                           SplitData& theData1Subtracted,
-                                           SplitData& theData2Subtracted,
-                                           SplitData& theDataIntersected );
-
-  static SplitDataList       ExtractSeparateData( const SplitData& theData );
+private:
 
+  /**
+   * Split input faces.
+   */
+  static Standard_Integer SplitFaces(const TopoDS_Compound& theComp, HYDROData_Transform& theTool);
 };
 
 #endif