Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROData / HYDROData_Region.h
index 23cd0d6232fa9be8dc418b896def1d46ff685df4..5ba5bf969527ec0575ce4fc0342c605d3b56aeb7 100644 (file)
@@ -2,26 +2,29 @@
 #ifndef HYDROData_Region_HeaderFile
 #define HYDROData_Region_HeaderFile
 
-#include <HYDROData_Domain.h>
+#include "HYDROData_Entity.h"
 
 
-DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Domain)
+DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
 
+class Handle(HYDROData_Zone);
 
-/**\class HYDROData_Domain
- * \brief Class that stores/retreives information about the 2d surface.
+/**\class HYDROData_Region
+ * \brief Regions are groups (lists) of zones, they can include one or several zones.
  */
-class HYDROData_Region : public HYDROData_Domain
+class HYDROData_Region : public HYDROData_Entity
 {
 
 protected:
+
   /**
    * Enumeration of tags corresponding to the persistent object parameters.
    */
   enum DataTag
   {
-    DataTag_First = HYDROData_Domain::DataTag_First + 100, ///< first tag, to reserve
-    DataTag_Face
+    DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+    DataTag_ChildZone,    ///< child zones
+    DataTag_Zone,         ///< reference zones
   };
 
 public:
@@ -33,17 +36,44 @@ public:
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; }
 
   /**
-   * Sets the shape of the object.
+   * Dump object to Python script representation.
+   */
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) 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 bool AddZone( const Handle(HYDROData_Zone)& theZone );
+
+  /**
+   * Returns all reference zone of region.
+   */
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
+
+  /**
+   * Removes reference zone from region.
    */
-  HYDRODATA_EXPORT void SetFace( const TopoDS_Face& theFace );
+  HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone );
+
+  /**
+   * Removes all reference zones from region.
+   */
+  HYDRODATA_EXPORT virtual void RemoveZones();
+
+
+protected:
 
   /**
-   * Returns the shape of the the object (redefined method).
+   * Create new one reference zone for region on child label.
+   * The new zone is added into the list of reference zones.
    */
-  HYDRODATA_EXPORT virtual TopoDS_Face Face() const;
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone();
 
 protected:
 
+  friend class HYDROData_CalculationCase;
   friend class HYDROData_Iterator;
 
   /**
@@ -56,11 +86,6 @@ protected:
    * Destructs properties of the object and object itself, removes it from the document.
    */
   ~HYDROData_Region();
-
-  /**
-   * Returns id for creation of object in python scripting.
-   */
-  virtual QString getPythonKindId() const;
 };
 
 #endif