X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Calculation.h;h=60acfb8d33286078d6735e5b3b1d54d77f42ab18;hb=0d9decc8762a829f1bdc69048fab08122e441ec0;hp=64de389ef9fb2ba4488e217b34493f30b5505e57;hpb=bd1a4992da8d54929ec556df6db4e7e0ebbfbbd7;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Calculation.h b/src/HYDROData/HYDROData_Calculation.h index 64de389e..60acfb8d 100644 --- a/src/HYDROData/HYDROData_Calculation.h +++ b/src/HYDROData/HYDROData_Calculation.h @@ -1,26 +1,21 @@ -#ifndef HYDROData_HYDROData_Calculation -#define HYDROData_HYDROData_Calculation -#include +#ifndef HYDROData_Calculation_HeaderFile +#define HYDROData_Calculation_HeaderFile -class gp_XY; -class gp_XYZ; -class QPointF; -class QFile; +#include -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 “Zone of water”. * - * Calculation case is defined by selection of Geometry objects with or without “Zone of water”. */ -class HYDROData_Calculation : public HYDROData_Object +class HYDROData_Calculation : public HYDROData_Entity { protected: @@ -30,10 +25,18 @@ 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: @@ -55,93 +58,111 @@ 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: