Salome HOME
Import polyline from shape (Feature #228).
[modules/hydro.git] / src / HYDROData / HYDROData_SplitToZonesTool.h
index dd70ed421d8ff5615f27edc2fd393d0a23c6cdc1..28413ef7ca122a4c7e41129b142efbcb3a4fba9d 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <QStringList>
 
-class Handle(HYDROData_Polyline);
+class Handle(HYDROData_PolylineXY);
 
 /**
  * \class HYDROData_SplitToZonesTool
@@ -20,18 +20,29 @@ class HYDRODATA_EXPORT HYDROData_SplitToZonesTool
 public:
   struct HYDRODATA_EXPORT SplitData
   {
-    TopoDS_Shape Shape;
-    QStringList  ObjectNames;
-
-    SplitData() {}
+    enum SplitObjectType
+    {
+      Data_None,
+      Data_Zone,
+      Data_Edge
+    };
+
+    TopoDS_Shape    Shape;
+    QStringList     ObjectNames;
+    SplitObjectType Type;
+
+    SplitData() :
+     Type( Data_None ) {}
     
-    SplitData( const TopoDS_Shape& theShape,
-               const QStringList& theObjectNames ) :
-      Shape( theShape ), ObjectNames( theObjectNames ) {}
+    SplitData( const SplitObjectType& theType,
+               const TopoDS_Shape&    theShape,
+               const QStringList&     theObjectNames ) :
+      Type( theType ), Shape( theShape ), ObjectNames( theObjectNames ) {}
 
-    SplitData( const TopoDS_Shape& theShape,
-               const QString& theObjectNames ) :
-      Shape( theShape ), ObjectNames( theObjectNames ) {}
+    SplitData( const SplitObjectType& theType,
+               const TopoDS_Shape&    theShape,
+               const QString&         theObjectName ) :
+      Type( theType ), Shape( theShape ), ObjectNames( theObjectName ) {}
 
     TopoDS_Face Face() const;
   };
@@ -41,7 +52,9 @@ public:
 
 public:
 
-  static SplitDataList       SplitToZones( const HYDROData_SequenceOfObjects& theObjectList );
+  static SplitDataList       Split( const HYDROData_SequenceOfObjects&  theObjectList,
+                                    const HYDROData_SequenceOfObjects&  theGroupsList,
+                                    const Handle(HYDROData_PolylineXY)& thePolyline );
 
 private: