Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROData / HYDROData_Region.h
index 1579be6ccc93834093a6612d9add305a0330de56..5ba5bf969527ec0575ce4fc0342c605d3b56aeb7 100644 (file)
@@ -23,16 +23,8 @@ protected:
   enum DataTag
   {
     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
-    DataTag_Zone    ///< reference zones
-  };
-
-  /**
-   * 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_Zone      ///< child zones
+    DataTag_ChildZone,    ///< child zones
+    DataTag_Zone,         ///< reference zones
   };
 
 public:
@@ -49,49 +41,11 @@ public:
   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
 
 
-  /**
-   * Create new one reference zone for region on child label.
-   * The new zone is not added into the list of reference zones.
-   */
-  HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) AddNewZone();
-
-  /**
-   * Removes all child zones from region.
-   */
-  HYDRODATA_EXPORT virtual void RemoveChildZones();
-
-
-  /**
-   * Returns number of reference zones of region.
-   */
-  int NbZones() const;
-
   /**
    * Add new one reference zone for region.
+   * The label of theZone is changed in case if old parent is not this region.
    */
-  HYDRODATA_EXPORT virtual void AddZone( const Handle(HYDROData_Zone)& theZone );
-
-  /**
-   * Replace the reference zone for region.
-   */
-  HYDRODATA_EXPORT virtual void SetZone( const int                     theIndex,
-                                         const Handle(HYDROData_Zone)& theZone );
-
-  /**
-   * Inserts the reference zone for region before given index.
-   */
-  HYDRODATA_EXPORT virtual void InsertZone( const int                     theBeforeIndex,
-                                            const Handle(HYDROData_Zone)& theZone );
-
-  /**
-   * Sets reference zones for calculation region.
-   */
-  HYDRODATA_EXPORT virtual void SetZones( const HYDROData_SequenceOfObjects& theZones );
-
-  /**
-   * Returns reference zone of region by index.
-   */
-  HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZone( const int theIndex ) const;
+  HYDRODATA_EXPORT virtual bool AddZone( const Handle(HYDROData_Zone)& theZone );
 
   /**
    * Returns all reference zone of region.
@@ -103,11 +57,6 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone );
 
-  /**
-   * Removes reference zone from region by it index.
-   */
-  HYDRODATA_EXPORT virtual void RemoveZone( const int theIndex );
-
   /**
    * Removes all reference zones from region.
    */
@@ -116,7 +65,15 @@ public:
 
 protected:
 
-  friend class HYDROData_Calculation;
+  /**
+   * Create new one reference zone for region on child label.
+   * The new zone is added into the list of reference zones.
+   */
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone();
+
+protected:
+
+  friend class HYDROData_CalculationCase;
   friend class HYDROData_Iterator;
 
   /**