-#ifndef HYDROData_HYDROData_Calculation
-#define HYDROData_HYDROData_Calculation
-#include <HYDROData_Object.h>
+#ifndef HYDROData_Calculation_HeaderFile
+#define HYDROData_Calculation_HeaderFile
-class gp_XY;
-class gp_XYZ;
-class QPointF;
-class QFile;
+#include <HYDROData_Entity.h>
-class Handle(HYDROData_Polyline);
-class Handle(HYDROData_Zone);
+class Handle(HYDROData_Object);
+class Handle(HYDROData_Region);
-DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Object)
+DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity)
/**\class HYDROData_Calculation
- * \brief Class that stores/retreives information about the Calculation case.
+ * \brief Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94.
*
- * Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94.
*/
-class HYDROData_Calculation : public HYDROData_Object
+class HYDROData_Calculation : public HYDROData_Entity
{
protected:
*/
enum DataTag
{
- DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
- DataTag_BoundaryPolyline, ///< reference boundary polyline
- DataTag_Zone, ///< reference zones
- DataTag_SplittedZone ///< reference splitted zones
+ DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_GeometryObject, ///< reference geometry objects
+ DataTag_Region ///< reference regions
+ };
+
+ /**
+ * Enumeration of tags corresponding to the child sub-objects of object.
+ */
+ enum ChildTag
+ {
+ ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
+ ChildTag_Region ///< child regions
};
public:
// Public methods to work with Calculation
/**
- * Sets boundary polyline for calculation case.
+ * Split reference geometry objects to non-intersected regions.
*/
- HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
+ HYDRODATA_EXPORT virtual void SplitGeometryObjects();
+
/**
- * Returns boundary polyline of calculation case.
+ * Returns number of geometry objects for calculation case.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
+ HYDRODATA_EXPORT virtual int NbGeometryObjects() const;
/**
- * Removes boundary polyline of calculation case.
+ * Add new one geometry object for calculation case.
*/
- HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
+ HYDRODATA_EXPORT virtual void AddGeometryObject( const Handle(HYDROData_Object)& theObject );
+ /**
+ * Replace the geometry object for calculation case.
+ */
+ HYDRODATA_EXPORT virtual void SetGeometryObject( const int theIndex,
+ const Handle(HYDROData_Object)& theObject );
/**
- * Returns number of refrence zones for calculation case.
+ * Sets the geometry object for calculation case.
*/
- HYDRODATA_EXPORT virtual int NbZones() const;
+ HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
/**
- * Add new one refrence zone for calculation case.
+ * Returns geometry object of calculation case by index.
*/
- HYDRODATA_EXPORT virtual void AddZone( const Handle(HYDROData_Zone)& theZone );
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
/**
- * Replace the refrence zone for calculation case.
+ * Returns all geometry objects of calculation case.
*/
- HYDRODATA_EXPORT virtual void SetZone( const int theIndex,
- const Handle(HYDROData_Zone)& theBathymetry );
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
/**
- * Sets the refrence zones for calculation case.
+ * Removes all geometry objects from calculation case.
*/
- HYDRODATA_EXPORT virtual void SetZones( const HYDROData_SequenceOfObjects& theZones );
+ HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
+
/**
- * Returns refrence zone of calculation case by index.
+ * Add new one region for calculation case.
+ * The new region is not added into the list of reference regions.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZone( const int theIndex ) const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion();
/**
- * Returns all refrence zone of calculation case.
+ * Removes all child regions from calculation case.
*/
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
+ HYDRODATA_EXPORT virtual void RemoveChildRegions();
+
/**
- * Removes all refrence zone of calculation case.
+ * Returns number of reference regions of calculation case.
*/
- HYDRODATA_EXPORT virtual void RemoveZones();
+ int NbRegions() const;
+ /**
+ * Add new one reference region for calculation case.
+ */
+ HYDRODATA_EXPORT virtual void AddRegion( const Handle(HYDROData_Region)& theRegion );
+
+ /**
+ * Replace the reference region for calculation case.
+ */
+ HYDRODATA_EXPORT virtual void SetRegion( const int theIndex,
+ const Handle(HYDROData_Region)& theRegion );
/**
- * Returns number of splitted zones for calculation case.
+ * Inserts the reference region for calculation case before given index.
*/
- HYDRODATA_EXPORT virtual int NbSplittedZones() const;
+ HYDRODATA_EXPORT virtual void InsertRegion( const int theBeforeIndex,
+ const Handle(HYDROData_Region)& theRegion );
/**
- * Add new one splitted zone for calculation case.
+ * Sets reference regions for calculation case.
*/
- HYDRODATA_EXPORT virtual void AddSplittedZone( const Handle(HYDROData_Zone)& theZone );
+ HYDRODATA_EXPORT virtual void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
/**
- * Replace the splitted zone for calculation case.
+ * Returns reference region of calculation case by index.
*/
- HYDRODATA_EXPORT virtual void SetSplittedZone( const int theIndex,
- const Handle(HYDROData_Zone)& theBathymetry );
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const;
/**
- * Sets the refrence zones for calculation case.
+ * Returns all reference regions of calculation case.
*/
- HYDRODATA_EXPORT virtual void SetSplittedZones( const HYDROData_SequenceOfObjects& theZones );
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
/**
- * Returns splitted zone of calculation case by index.
+ * Removes reference region from calculation case.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetSplittedZone( const int theIndex ) const;
+ HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
/**
- * Returns all splitted zone of calculation case.
+ * Removes reference region from calculation case by it index.
*/
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetSplittedZones() const;
+ HYDRODATA_EXPORT virtual void RemoveRegion( const int theIndex );
/**
- * Removes all splitted refrence zone of calculation case.
+ * Removes all reference regions from calculation case.
*/
- HYDRODATA_EXPORT virtual void RemoveSplittedZones();
+ HYDRODATA_EXPORT virtual void RemoveRegions();
protected: