#ifndef HYDROData_Zone_HeaderFile
#define HYDROData_Zone_HeaderFile
-#include <HYDROData_Domain.h>
+#include <HYDROData_Entity.h>
-#include <QPainterPath>
-class Handle(HYDROData_Polyline);
+class Handle(HYDROData_Object);
+class Handle(HYDROData_Bathymetry);
+class TopoDS_Shape;
-DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Domain)
+DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
/**\class HYDROData_Zone
* \brief Class that stores/retreives information about the 2d face.
*/
-class HYDROData_Zone : public HYDROData_Domain
+class HYDROData_Zone : public HYDROData_Entity
{
+public:
+
+ // Enumeration of mergin types for conflict bathymetries
+ enum MergeBathymetriesType
+ {
+ Merge_UNKNOWN, // Undefined
+ Merge_ZMIN, // The minimum values
+ Merge_ZMAX, // The maximum values
+ Merge_Object // Only one bathymetry will be taken into account
+ };
+
protected:
/**
* Enumeration of tags corresponding to the persistent object parameters.
*/
enum DataTag
{
- DataTag_First = HYDROData_Domain::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Polyline, ///< reference polyline
+ DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_Shape, ///< reference shape
+ DataTag_GeometryObject, ///< reference geometry objects
+ DataTag_MergeType, ///< mergin type of conflict bathymetries
+ DataTag_Bathymetry, ///< reference bathymetry
};
public:
/**
- * Sets reference polyline object for zone.
+ * Sets the shape of the zone.
*/
- HYDRODATA_EXPORT virtual void SetPolyline( const Handle(HYDROData_Polyline)& thePolyline );
+ HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
/**
- * Returns reference polyline object of zone.
+ * Returns the shape of the zone.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetPolyline() const;
+ HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
+
/**
- * Remove reference polyline object of zone.
+ * Returns true if zone needs merge of bathymetries.
*/
- HYDRODATA_EXPORT virtual void RemovePolyline();
+ HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
+
+ /**
+ * Sets the merging type for conflict bathymetries.
+ * By default it is set to Merge_UNKNOWN.
+ */
+ HYDRODATA_EXPORT virtual void SetMergeType( const MergeBathymetriesType& theType );
/**
- * Returns data of object wrapped to QVariant.
- * Reimplemented to wrap and return saved 2d polyline.
+ * Returns the merging type for conflict bathymetries.
*/
- //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
+ HYDRODATA_EXPORT virtual MergeBathymetriesType GetMergeType() const;
+
/**
- * Returns the painter path. The painter path is construct by polyline
+ * Sets the reference bathymetry to resolve the conflict.
+ * This object is used only in case of "Merge_Object" merge type.
*/
- HYDRODATA_EXPORT QPainterPath GetPainterPath() const;
+ HYDRODATA_EXPORT virtual void SetMergeBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+ /**
+ * Returns the reference bathymetry to resolve the conflict.
+ */
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetMergeBathymetry() const;
+
+ /**
+ * Removes the reference bathymetry for resolving the conflict.
+ */
+ HYDRODATA_EXPORT virtual void RemoveMergeBathymetry();
+
+
+ /**
+ * Add new one geometry object for zone.
+ */
+ HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
+
+ /**
+ * Returns all geometry objects of zone.
+ */
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
+
+ /**
+ * Removes all geometry objects from zone.
+ */
+ HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
protected:
+ friend class HYDROData_Region;
friend class HYDROData_Iterator;
/**
*/
~HYDROData_Zone();
- /**
- * Returns id for creation of object in python scripting.
- */
- virtual QString getPythonKindId() const;
};
#endif