]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
HYDROData_Obstacle has been wrapped for Python.
authorrkv <rkv@opencascade.com>
Thu, 26 Dec 2013 08:04:15 +0000 (08:04 +0000)
committerrkv <rkv@opencascade.com>
Thu, 26 Dec 2013 08:04:15 +0000 (08:04 +0000)
src/HYDROData/HYDROData_Obstacle.h
src/HYDROPy/CMakeLists.txt
src/HYDROPy/HYDROData.sip
src/HYDROPy/HYDROData_ArtificialObject.sip
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_Object.sip

index 2b51e06ec2abdd380722e1cfd5905267d3a0808d..9a9954fb680c89066fe702243d7b26574e446cf1 100644 (file)
@@ -126,7 +126,7 @@ protected:
    * Returns the type of child altitude object.
    * Reimplemented to create obstacle altitude object.
    */
-  virtual ObjectKind getAltitudeObjectType() const;
+  HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const;
 
 protected:
 
index 419bbe74a74a5885286cc43539cee234c361b95e..2ae650a535fefd85bf0f281ddc5676be171765ac 100644 (file)
@@ -61,6 +61,7 @@ SET(_sip_files2
   HYDROData_ProfileUZ.sip
   HYDROData_PolylineXY.sip
   HYDROData_ArtificialObject.sip
+  HYDROData_Obstacle.sip
   HYDROData_NaturalObject.sip
   HYDROData_Image.sip
   HYDROData_Bathymetry.sip
index e25e46716800d43ae15b52033306427a9b341759..2e9f91301d45d590099ed3510f640a03147d5fbd 100644 (file)
@@ -58,6 +58,7 @@ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 %Include HYDROData_ProfileUZ.sip
 %Include HYDROData_PolylineXY.sip
 %Include HYDROData_ArtificialObject.sip
+%Include HYDROData_Obstacle.sip
 %Include HYDROData_NaturalObject.sip
 %Include HYDROData_Image.sip
 %Include HYDROData_PolylineXY.sip
index dc301f893749318b2605a00d51230edaea0f7549..3172a7286b2a66d0dd10a1d07b887e6fa1dc2a04 100644 (file)
@@ -35,6 +35,10 @@ class HYDROData_ArtificialObject : HYDROData_Object /Abstract/
     // HYDROData_ArtificialObject sub-classes provide a unique kind ID.
     switch ( sipCpp->GetKind() )
     {
+      case KIND_OBSTACLE:
+        sipClass = sipClass_HYDROData_Obstacle;
+        break;
+
       case KIND_UNKNOWN:
         sipClass = sipClass_HYDROData_ArtificialObject;
         break;
index 37bd970f7f72dc08b7a7a144d6b1d781b50d8e7a..d1639754d66dde558418aa5860b2dd87cce5212c 100644 (file)
@@ -92,6 +92,11 @@ class HYDROData_Document
         aRes = new HYDROData_CalculationCase( *dynamic_cast<HYDROData_CalculationCase*>( theObject ) );
         break;
       }
+      case KIND_OBSTACLE:
+      {
+        aRes = new HYDROData_Obstacle( *dynamic_cast<HYDROData_Obstacle*>( theObject ) );
+        break;
+      }
       case KIND_REGION:
       {
         aRes = new HYDROData_Region( *dynamic_cast<HYDROData_Region*>( theObject ) );
index 3bba4c53cb946bcc08eebbc7f189e6febd537534..f0205a2f3adda593086515ba7a8fe920bdf614ac 100644 (file)
@@ -75,6 +75,10 @@ class HYDROData_Entity
         sipClass = sipClass_HYDROData_CalculationCase;
         break;
 
+      case KIND_OBSTACLE:
+        sipClass = sipClass_HYDROData_Obstacle;
+        break;
+
       case KIND_REGION:
         sipClass = sipClass_HYDROData_Region;
         break;
@@ -98,22 +102,22 @@ public:
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
    */
-  const ObjectKind GetKind() const;
+  virtual const ObjectKind GetKind() const;
 
   /**
    * Returns the name of this object.
    */
-  QString GetName() const;
+  virtual QString GetName() const;
 
   /**
    * Updates the name of this object.
    */
-  void SetName(const QString& theName);
+  virtual void SetName(const QString& theName);
 
   /**
    * Updates object state.
    */
-  void Update();
+  virtual void Update();
 
   /**
    * Checks is object exists in the data structure.
index 10119b102747edd0f7c7e3865debf2490bc66a6b..0f128fb142466da9182e7aef6f138d24b840c01b 100644 (file)
@@ -40,6 +40,10 @@ class HYDROData_Object : HYDROData_Entity /Abstract/
       // HYDROData_Object sub-classes provide a unique kind ID.
       switch ( sipCpp->GetKind() )
       {
+        case KIND_OBSTACLE:
+          sipClass = sipClass_HYDROData_Obstacle;
+          break;
+
         case KIND_UNKNOWN:
           sipClass = sipClass_HYDROData_Object;
           break;