X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Calculation.h;h=60acfb8d33286078d6735e5b3b1d54d77f42ab18;hb=0d9decc8762a829f1bdc69048fab08122e441ec0;hp=1f9a7716d1d0f3abbdaedb229cf05d0d8c3496e4;hpb=1c5e5ce146491c870ecaf7fbffa48d43254aed88;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Calculation.h b/src/HYDROData/HYDROData_Calculation.h index 1f9a7716..60acfb8d 100644 --- a/src/HYDROData/HYDROData_Calculation.h +++ b/src/HYDROData/HYDROData_Calculation.h @@ -1,23 +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 -DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Object) +class Handle(HYDROData_Object); +class Handle(HYDROData_Region); + +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: @@ -27,7 +25,18 @@ protected: */ enum DataTag { - DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve + 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: @@ -48,6 +57,112 @@ public: public: // Public methods to work with Calculation + /** + * Split reference geometry objects to non-intersected regions. + */ + HYDRODATA_EXPORT virtual void SplitGeometryObjects(); + + + /** + * Returns number of geometry objects for calculation case. + */ + HYDRODATA_EXPORT virtual int NbGeometryObjects() const; + + /** + * Add new one geometry object for calculation case. + */ + 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 ); + + /** + * Sets the geometry object for calculation case. + */ + HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects ); + + /** + * Returns geometry object of calculation case by index. + */ + HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const; + + /** + * Returns all geometry objects of calculation case. + */ + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const; + + /** + * Removes all geometry objects from calculation case. + */ + HYDRODATA_EXPORT virtual void RemoveGeometryObjects(); + + + /** + * Add new one region for calculation case. + * The new region is not added into the list of reference regions. + */ + HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion(); + + /** + * Removes all child regions from calculation case. + */ + HYDRODATA_EXPORT virtual void RemoveChildRegions(); + + + /** + * Returns number of reference regions of calculation case. + */ + 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 ); + + /** + * Inserts the reference region for calculation case before given index. + */ + HYDRODATA_EXPORT virtual void InsertRegion( const int theBeforeIndex, + const Handle(HYDROData_Region)& theRegion ); + + /** + * Sets reference regions for calculation case. + */ + HYDRODATA_EXPORT virtual void SetRegions( const HYDROData_SequenceOfObjects& theRegions ); + + /** + * Returns reference region of calculation case by index. + */ + HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const; + + /** + * Returns all reference regions of calculation case. + */ + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const; + + /** + * Removes reference region from calculation case. + */ + HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion ); + + /** + * Removes reference region from calculation case by it index. + */ + HYDRODATA_EXPORT virtual void RemoveRegion( const int theIndex ); + + /** + * Removes all reference regions from calculation case. + */ + HYDRODATA_EXPORT virtual void RemoveRegions(); protected: