Salome HOME
The data model has been rolled back to previous version.
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.h
index 916057bef31dd583ecf72e245c565dadd1d1795e..1b6d4bfbeef34bac283ea1d3cf381bb8dd3cb0a3 100644 (file)
@@ -5,9 +5,12 @@
 
 #include <HYDROData_Entity.h>
 
+class TopoDS_Shell;
+
 class Handle(HYDROData_Object);
 class Handle(HYDROData_Region);
 class Handle(HYDROData_Zone);
+class Handle(HYDROData_Polyline);
 
 DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
 
@@ -28,16 +31,9 @@ protected:
   {
     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
+    DataTag_ChildRegion,      ///< child regions
+    DataTag_Region,           ///< reference regions
+    DataTag_Polyline          ///< reference boundary polyline
   };
 
 public:
@@ -49,6 +45,11 @@ public:
    */
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
 
+  /**
+   * Updates the name of this object.
+   * Reimplemented to update the names of regions and zones.
+   */
+  HYDRODATA_EXPORT virtual void SetName( const QString& theName );
 
   /**
    * Dump Calculation object to Python script representation.
@@ -85,6 +86,22 @@ public:
   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
 
 
+  /**
+   * Sets reference boundary polyline object for calculation case.
+   */
+  HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
+
+  /**
+   * Returns reference boundary polyline object of calculation case.
+   */
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
+
+  /**
+   * Remove reference boundary polyline object from calculation case.
+   */
+  HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
+
+
   /**
    * Add new one child region for calculation case.
    * The new region is added into the list of reference regions.
@@ -105,6 +122,11 @@ public:
    */
   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
 
+  /**
+   * Updates names of regions to correct order.
+   */
+  HYDRODATA_EXPORT virtual void UpdateRegionsOrder();
+
   /**
    * Removes reference region from calculation case.
    */
@@ -115,6 +137,12 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemoveRegions();
 
+  /**
+   * Returns shell containing faces which correspond to regions.
+   * \return shell as TopoDS_Shell
+   */
+  HYDRODATA_EXPORT virtual TopoDS_Shell GetShell();
+
 private:
 
   /**
@@ -132,12 +160,12 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDROData_CalculationCase();
+  HYDRODATA_EXPORT HYDROData_CalculationCase();
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
    */
-  ~HYDROData_CalculationCase();
+  HYDRODATA_EXPORT ~HYDROData_CalculationCase();
 };
 
 #endif