Salome HOME
refs #430: incorrect coordinates in dump polyline
[modules/hydro.git] / src / HYDROData / HYDROData_Region.h
index 09c69de61d6d87dd0b8d82c83b9884a1f5898cd4..3307b324377ebc93527832bd8765e24bb01f322c 100644 (file)
@@ -2,13 +2,15 @@
 #ifndef HYDROData_Region_HeaderFile
 #define HYDROData_Region_HeaderFile
 
-#include "HYDROData_Entity.h"
+#include "HYDROData_ShapesGroup.h"
 
 
 DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
 
 class Handle(HYDROData_Zone);
 
+class TopoDS_Shape;
+
 /**\class HYDROData_Region
  * \brief Regions are groups (lists) of zones, they can include one or several zones.
  */
@@ -23,18 +25,10 @@ protected:
   enum DataTag
   {
     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+    DataTag_ChildZone,    ///< child zones
     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
-  };
-
 public:
   DEFINE_STANDARD_RTTI(HYDROData_Region);
 
@@ -43,10 +37,28 @@ public:
    */
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; }
 
+
   /**
-   * Dump object to Python script representation.
+   * Returns flag indicating that object is updateble or not.
    */
-  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+  HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
+
+
+  /**
+   * Removes object and it child sub-objects from the data structure.
+   * Reimplemented to update names of regions in father calculation.
+   */
+  HYDRODATA_EXPORT virtual void Remove();
+
+  /**
+   * Returns flag indicating that object can be removed or not.
+   */
+  HYDRODATA_EXPORT virtual bool CanRemove();
+
+  /**
+   * Returns the list of all reference objects of this object.
+   */
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
 
 
   /**
@@ -70,6 +82,14 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemoveZones();
 
+  /**
+   * \brief Returns the shape of the region.
+   * Shape of the region could be:
+   * - a face which is the union of the region zones faces
+   * - a shell if the zones faces can't be united into one face
+   * \return shape as TopoDS_Shape
+   */
+  HYDRODATA_EXPORT virtual TopoDS_Shape GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups = 0 ) const;
 
 protected:
 
@@ -88,12 +108,12 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDROData_Region();
+  HYDRODATA_EXPORT HYDROData_Region();
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
    */
-  ~HYDROData_Region();
+  HYDRODATA_EXPORT ~HYDROData_Region();
 };
 
 #endif