From: rkv Date: Thu, 26 Dec 2013 08:04:15 +0000 (+0000) Subject: HYDROData_Obstacle has been wrapped for Python. X-Git-Tag: BR_hydro_v_0_7~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ef4f1809f4602d520ddfe0f8c82630cbc2fda2f;p=modules%2Fhydro.git HYDROData_Obstacle has been wrapped for Python. --- diff --git a/src/HYDROData/HYDROData_Obstacle.h b/src/HYDROData/HYDROData_Obstacle.h index 2b51e06e..9a9954fb 100644 --- a/src/HYDROData/HYDROData_Obstacle.h +++ b/src/HYDROData/HYDROData_Obstacle.h @@ -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: diff --git a/src/HYDROPy/CMakeLists.txt b/src/HYDROPy/CMakeLists.txt index 419bbe74..2ae650a5 100644 --- a/src/HYDROPy/CMakeLists.txt +++ b/src/HYDROPy/CMakeLists.txt @@ -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 diff --git a/src/HYDROPy/HYDROData.sip b/src/HYDROPy/HYDROData.sip index e25e4671..2e9f9130 100644 --- a/src/HYDROPy/HYDROData.sip +++ b/src/HYDROPy/HYDROData.sip @@ -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 diff --git a/src/HYDROPy/HYDROData_ArtificialObject.sip b/src/HYDROPy/HYDROData_ArtificialObject.sip index dc301f89..3172a728 100644 --- a/src/HYDROPy/HYDROData_ArtificialObject.sip +++ b/src/HYDROPy/HYDROData_ArtificialObject.sip @@ -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; diff --git a/src/HYDROPy/HYDROData_Document.sip b/src/HYDROPy/HYDROData_Document.sip index 37bd970f..d1639754 100644 --- a/src/HYDROPy/HYDROData_Document.sip +++ b/src/HYDROPy/HYDROData_Document.sip @@ -92,6 +92,11 @@ class HYDROData_Document aRes = new HYDROData_CalculationCase( *dynamic_cast( theObject ) ); break; } + case KIND_OBSTACLE: + { + aRes = new HYDROData_Obstacle( *dynamic_cast( theObject ) ); + break; + } case KIND_REGION: { aRes = new HYDROData_Region( *dynamic_cast( theObject ) ); diff --git a/src/HYDROPy/HYDROData_Entity.sip b/src/HYDROPy/HYDROData_Entity.sip index 3bba4c53..f0205a2f 100644 --- a/src/HYDROPy/HYDROData_Entity.sip +++ b/src/HYDROPy/HYDROData_Entity.sip @@ -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. diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 10119b10..0f128fb1 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -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;