Salome HOME
Dump to Python script correction.
[modules/hydro.git] / src / HYDROData / HYDROData_Calculation.h
index a5b72c0fdc91155acb03244d23f4ef9bd4b04bde..60acfb8d33286078d6735e5b3b1d54d77f42ab18 100644 (file)
@@ -1,27 +1,21 @@
 
-#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:
@@ -31,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_Region               ///< reference regions
+    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:
@@ -56,91 +58,109 @@ 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 );
 
   /**
-   * Returns number of refrence zones for calculation case.
+   * Replace the geometry object for calculation case.
    */
-  HYDRODATA_EXPORT virtual int NbZones() const;
+  HYDRODATA_EXPORT virtual void SetGeometryObject( const int                       theIndex,
+                                                   const Handle(HYDROData_Object)& theObject );
 
   /**
-   * Add new one refrence zone for calculation case.
+   * Sets the geometry object for calculation case.
    */
-  HYDRODATA_EXPORT virtual void AddZone( const Handle(HYDROData_Zone)& theZone );
+  HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
 
   /**
-   * Replace the refrence zone for calculation case.
+   * Returns geometry object of calculation case by index.
    */
-  HYDRODATA_EXPORT virtual void SetZone( const int                     theIndex,
-                                         const Handle(HYDROData_Zone)& theZone );
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
 
   /**
-   * Sets the refrence zones for calculation case.
+   * Returns all geometry objects of calculation case.
    */
-  HYDRODATA_EXPORT virtual void SetZones( const HYDROData_SequenceOfObjects& theZones );
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
 
   /**
-   * Returns refrence zone of calculation case by index.
+   * Removes all geometry objects from calculation case.
    */
-  HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZone( const int theIndex ) const;
+  HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
+
 
   /**
-   * Returns all refrence zone of calculation case.
+   * Add new one region for calculation case.
+   * The new region is not added into the list of reference regions.
    */
-  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion();
 
   /**
-   * Removes all refrence zone of calculation case.
+   * Removes all child regions from calculation case.
    */
-  HYDRODATA_EXPORT virtual void RemoveZones();
+  HYDRODATA_EXPORT virtual void RemoveChildRegions();
 
 
   /**
-   * Returns number of regions for calculation case.
+   * Returns number of reference regions of calculation case.
    */
-  HYDRODATA_EXPORT virtual int NbRegions() const;
+  int NbRegions() const;
 
   /**
-   * Add new one region for calculation case.
+   * Add new one reference region for calculation case.
    */
   HYDRODATA_EXPORT virtual void AddRegion( const Handle(HYDROData_Region)& theRegion );
 
   /**
-   * Replace the region for calculation case.
+   * Replace the reference region for calculation case.
    */
   HYDRODATA_EXPORT virtual void SetRegion( const int                       theIndex,
                                            const Handle(HYDROData_Region)& theRegion );
 
   /**
-   * Sets the refrence region for calculation case.
+   * 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 region of calculation case by index.
+   * Returns reference region of calculation case by index.
    */
   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const;
 
   /**
-   * Returns all regions of calculation case.
+   * Returns all reference regions of calculation case.
    */
   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
 
   /**
-   * Removes all regions of calculation case.
+   * 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();