#include <HYDROData_Entity.h>
class Handle(HYDROData_Object);
+class Handle(HYDROData_Bathymetry);
class TopoDS_Shape;
DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
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_Entity::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Shape, ///< reference shape
- DataTag_GeometryObject, ///< reference geometry objects
+ DataTag_Shape, ///< reference shape
+ DataTag_GeometryObject, ///< reference geometry objects
+ DataTag_MergeType, ///< mergin type of conflict bathymetries
+ DataTag_Bathymetry, ///< reference bathymetry
};
public:
/**
- * Returns number of geometry objects for zone.
+ * Returns true if zone needs merge of bathymetries.
*/
- HYDRODATA_EXPORT virtual int NbGeometryObjects() const;
+ HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
+
/**
- * Add new one geometry object for zone.
+ * Sets the merging type for conflict bathymetries.
+ * By default it is set to Merge_UNKNOWN.
*/
- HYDRODATA_EXPORT virtual void AddGeometryObject( const Handle(HYDROData_Object)& theObject );
+ HYDRODATA_EXPORT virtual void SetMergeType( const MergeBathymetriesType& theType );
/**
- * Replace the geometry object for zone.
+ * Returns the merging type for conflict bathymetries.
*/
- HYDRODATA_EXPORT virtual void SetGeometryObject( const int theIndex,
- const Handle(HYDROData_Object)& theObject );
+ HYDRODATA_EXPORT virtual MergeBathymetriesType GetMergeType() const;
+
/**
- * Sets the geometry object for zone.
+ * Sets the reference bathymetry to resolve the conflict.
+ * This object is used only in case of "Merge_Object" merge type.
*/
- HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
+ HYDRODATA_EXPORT virtual void SetMergeBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
/**
- * Returns geometry object of zone by index.
+ * 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 Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
+ HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
/**
* Returns all geometry objects of zone.
* Creates new object in the internal data structure. Use higher level objects
* to create objects with real content.
*/
- HYDROData_Zone();
+ HYDRODATA_EXPORT HYDROData_Zone();
/**
* Destructs properties of the object and object itself, removes it from the document.
*/
- ~HYDROData_Zone();
+ HYDRODATA_EXPORT ~HYDROData_Zone();
};