Salome HOME
Lot 2: change bathy associated to natural object propagated to all cases without...
[modules/hydro.git] / src / HYDROData / HYDROData_Region.h
index 45fd385c0847f5e58108c2c7b30f49a1f968e4eb..b9a5314c6ae5febf2442120a457ad5d8fea4550b 100644 (file)
@@ -1,3 +1,20 @@
+// Copyright (C) 2014-2015  EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef HYDROData_Region_HeaderFile
 #define HYDROData_Region_HeaderFile
@@ -5,10 +22,8 @@
 #include "HYDROData_ShapesGroup.h"
 
 
-DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
-
-class Handle(HYDROData_Zone);
-class Handle(HYDROData_Document);
+class HYDROData_Zone;
+class HYDROData_Document;
 class TopoDS_Shape;
 class TopoDS_Face;
 class QStringList;
@@ -18,9 +33,7 @@ class QStringList;
  */
 class HYDROData_Region : public HYDROData_Entity
 {
-
 protected:
-
   /**
    * Enumeration of tags corresponding to the persistent object parameters.
    */
@@ -32,7 +45,7 @@ protected:
   };
 
 public:
-  DEFINE_STANDARD_RTTI(HYDROData_Region);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity);
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -42,7 +55,9 @@ public:
   /**
    * Dump object to Python script representation.
    */
-  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath,
+                                                     MapOfTreatedObjects& theTreatedObjects,
+                                                     QString defRegName = QString()) const;
 
   /**
    * Returns flag indicating that object is updateble or not.
@@ -81,7 +96,7 @@ public:
   /**
    * Removes reference zone from region.
    */
-  HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone );
+  HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone, bool removeRegion = true );
 
   /**
    * Removes all reference zones from region.
@@ -95,9 +110,10 @@ public:
    * - 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;
+  HYDRODATA_EXPORT virtual TopoDS_Shape GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups = 0, 
+                                                  const TopTools_SequenceOfShape* IntSh = NULL ) const;
 
-protected:
+  HYDRODATA_EXPORT bool IsSubmersible() const;
 
   /**
    * Create new one reference zone for region on child label.