]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Reference Bathymetry objects moved to base for geometry objects class.
authoradv <adv@opencascade.com>
Tue, 29 Oct 2013 11:06:35 +0000 (11:06 +0000)
committeradv <adv@opencascade.com>
Tue, 29 Oct 2013 11:06:35 +0000 (11:06 +0000)
src/HYDROData/HYDROData_ImmersibleZone.cxx
src/HYDROData/HYDROData_ImmersibleZone.h
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h

index 286cbaa39a9df099166b418d0d2221189f2f7acb..a174aa9258aedb9037137132dd68cca28f3db860 100644 (file)
@@ -138,20 +138,4 @@ void HYDROData_ImmersibleZone::RemovePolyline()
   ClearReferenceObjects( DataTag_Polyline );
 }
 
-void HYDROData_ImmersibleZone::SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
-{
-  SetReferenceObject( theBathymetry, DataTag_Bathymetry );
-}
-
-Handle(HYDROData_Bathymetry) HYDROData_ImmersibleZone::GetBathymetry() const
-{
-  return Handle(HYDROData_Bathymetry)::DownCast( 
-           GetReferenceObject( DataTag_Bathymetry ) );
-}
-
-void HYDROData_ImmersibleZone::RemoveBathymetry()
-{
-  ClearReferenceObjects( DataTag_Bathymetry );
-}
-
 
index 883b2fd1d1a4791b949290772ae58cf097673cb3..8f9e2fc9e3c51d9679b26d7789f4d71e686225d3 100644 (file)
@@ -6,7 +6,6 @@
 
 DEFINE_STANDARD_HANDLE(HYDROData_ImmersibleZone, HYDROData_NaturalObject)
 
-class Handle(HYDROData_Bathymetry);
 class Handle(HYDROData_Polyline);
 
 /**\class HYDROData_ImmersibleZone
@@ -25,7 +24,6 @@ protected:
     DataTag_FillingColor, ///< filling color of immersible zone
     DataTag_BorderColor,  ///< border color of immersible zone
     DataTag_Polyline,     ///< reference polyline
-    DataTag_Bathymetry,   ///< reference bathymetry
 };
 
 public:
@@ -99,22 +97,6 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemovePolyline();
 
-
-  /**
-   * Set reference bathymetry object for zone.
-   */
-  HYDRODATA_EXPORT virtual void SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
-
-  /**
-   * Returns reference bathymetry object of zone.
-   */
-  HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry() const;
-
-  /**
-   * Clear the bathymetry object for zone.
-   */
-  HYDRODATA_EXPORT virtual void RemoveBathymetry();
-
 protected:
 
   friend class HYDROData_Iterator;
index ee54ec62e3dc52805eb4a832ef155be8b92d0962..87ffb2dfbdd881d30748c7f100de859e02104ad9 100644 (file)
@@ -1,6 +1,8 @@
 
 #include "HYDROData_Object.h"
 
+#include "HYDROData_Bathymetry.h"
+
 #include <TNaming_Builder.hxx>
 #include <TNaming_NamedShape.hxx>
 
@@ -30,6 +32,22 @@ void HYDROData_Object::SetShape3D( const TopoDS_Shape& theShape )
   aBuilder.Generated( theShape );
 }
 
+void HYDROData_Object::SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
+{
+  SetReferenceObject( theBathymetry, DataTag_Bathymetry );
+}
+
+Handle(HYDROData_Bathymetry) HYDROData_Object::GetBathymetry() const
+{
+  return Handle(HYDROData_Bathymetry)::DownCast( 
+           GetReferenceObject( DataTag_Bathymetry ) );
+}
+
+void HYDROData_Object::RemoveBathymetry()
+{
+  ClearReferenceObjects( DataTag_Bathymetry );
+}
+
 TopoDS_Shape HYDROData_Object::getTopShape() const
 {
   Handle(TNaming_NamedShape) aNamedShape;
index 805b593f34368136435b3052cbd4189787fa1b18..59ccfedb14dfb8172025c2b9e91a9ecd0cc1688a 100644 (file)
@@ -8,6 +8,7 @@ class TopoDS_Shape;
 
 DEFINE_STANDARD_HANDLE(HYDROData_Object, HYDROData_Entity)
 
+class Handle(HYDROData_Bathymetry);
 
 /**\class HYDROData_Object
  * \brief The base class for all geometrical objects in the HYDRO module.
@@ -24,6 +25,7 @@ protected:
     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
     DataTag_TopShape,
     DataTag_Shape3D,
+    DataTag_Bathymetry,   ///< reference bathymetry
   };
 
   /**
@@ -57,6 +59,23 @@ public:
    */
   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
 
+  
+  /**
+   * Set reference bathymetry object for geometry object.
+   */
+  HYDRODATA_EXPORT virtual void SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+  /**
+   * Returns reference bathymetry object of geometry object.
+   */
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry() const;
+
+  /**
+   * Clear the reference bathymetry object for geometry object.
+   */
+  HYDRODATA_EXPORT virtual void RemoveBathymetry();
+
+
 protected:
 
   /**