From: adv Date: Fri, 20 Dec 2013 10:31:53 +0000 (+0000) Subject: Altitude objects for Obstacle, Stream and Channel objects base implementation (Bug... X-Git-Tag: BR_hydro_v_0_6~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=517590ff502b021ac3b88b59c9f063a1470cc8a9;p=modules%2Fhydro.git Altitude objects for Obstacle, Stream and Channel objects base implementation (Bug #214). --- diff --git a/src/HYDROData/CMakeLists.txt b/src/HYDROData/CMakeLists.txt index 33fc1993..10aeff0e 100644 --- a/src/HYDROData/CMakeLists.txt +++ b/src/HYDROData/CMakeLists.txt @@ -23,6 +23,7 @@ set(PROJECT_HEADERS HYDROData_NaturalObject.h HYDROData_Object.h HYDROData_Obstacle.h + HYDROData_ObstacleAltitude.h HYDROData_OperationsFactory.h HYDROData_PolylineXY.h HYDROData_Polyline3D.h @@ -36,6 +37,7 @@ set(PROJECT_HEADERS HYDROData_SplittedShapesGroup.h HYDROData_SplitToZonesTool.h HYDROData_Stream.h + HYDROData_StreamAltitude.h HYDROData_Tool.h HYDROData_VisualState.h HYDROData_Zone.h @@ -63,6 +65,7 @@ set(PROJECT_SOURCES HYDROData_NaturalObject.cxx HYDROData_Object.cxx HYDROData_Obstacle.cxx + HYDROData_ObstacleAltitude.cxx HYDROData_OperationsFactory.cxx HYDROData_PolylineXY.cxx HYDROData_Polyline3D.cxx @@ -76,6 +79,7 @@ set(PROJECT_SOURCES HYDROData_SplittedShapesGroup.cxx HYDROData_SplitToZonesTool.cxx HYDROData_Stream.cxx + HYDROData_StreamAltitude.cxx HYDROData_Tool.cxx HYDROData_VisualState.cxx HYDROData_Zone.cxx diff --git a/src/HYDROData/HYDROData_Channel.cxx b/src/HYDROData/HYDROData_Channel.cxx index 7adfcd8d..63db110e 100644 --- a/src/HYDROData/HYDROData_Channel.cxx +++ b/src/HYDROData/HYDROData_Channel.cxx @@ -267,3 +267,8 @@ void HYDROData_Channel::RemoveProfile() // Indicate model of the need to update the chanel presentation SetToUpdate( true ); } + +ObjectKind HYDROData_Channel::getAltitudeObjectType() const +{ + return KIND_OBSTACLE_ALTITUDE; +} diff --git a/src/HYDROData/HYDROData_Channel.h b/src/HYDROData/HYDROData_Channel.h index 155f9e39..da1fe347 100644 --- a/src/HYDROData/HYDROData_Channel.h +++ b/src/HYDROData/HYDROData_Channel.h @@ -118,6 +118,12 @@ protected: */ HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const; + /** + * Returns the type of child altitude object. + * Reimplemented to create chanel altitude object. + */ + virtual ObjectKind getAltitudeObjectType() const; + protected: friend class HYDROData_Iterator; diff --git a/src/HYDROData/HYDROData_Entity.h b/src/HYDROData/HYDROData_Entity.h index 9bf5894b..1bd62a1b 100644 --- a/src/HYDROData/HYDROData_Entity.h +++ b/src/HYDROData/HYDROData_Entity.h @@ -44,7 +44,9 @@ const ObjectKind KIND_NATURAL_OBJECT = 20; const ObjectKind KIND_DUMMY_3D = 21; const ObjectKind KIND_SHAPES_GROUP = 22; const ObjectKind KIND_SPLITTED_GROUP = 23; -const ObjectKind KIND_LAST = KIND_SPLITTED_GROUP; +const ObjectKind KIND_STREAM_ALTITUDE = 24; +const ObjectKind KIND_OBSTACLE_ALTITUDE = 25; +const ObjectKind KIND_LAST = KIND_OBSTACLE_ALTITUDE; DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared) diff --git a/src/HYDROData/HYDROData_Iterator.cxx b/src/HYDROData/HYDROData_Iterator.cxx index ae37a417..181bc496 100644 --- a/src/HYDROData/HYDROData_Iterator.cxx +++ b/src/HYDROData/HYDROData_Iterator.cxx @@ -12,6 +12,7 @@ #include "HYDROData_Image.h" #include "HYDROData_ImmersibleZone.h" #include "HYDROData_Obstacle.h" +#include "HYDROData_ObstacleAltitude.h" #include "HYDROData_Polyline3D.h" #include "HYDROData_PolylineXY.h" #include "HYDROData_Profile.h" @@ -21,6 +22,7 @@ #include "HYDROData_River.h" #include "HYDROData_SplittedShapesGroup.h" #include "HYDROData_Stream.h" +#include "HYDROData_StreamAltitude.h" #include "HYDROData_Zone.h" #include @@ -107,28 +109,30 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel ) switch( aKind ) { - case KIND_IMAGE: aResult = new HYDROData_Image(); break; - case KIND_POLYLINE: aResult = new HYDROData_Polyline3D(); break; - case KIND_BATHYMETRY: aResult = new HYDROData_Bathymetry(); break; - case KIND_ALTITUDE: aResult = new HYDROData_AltitudeObject(); break; - case KIND_IMMERSIBLE_ZONE: aResult = new HYDROData_ImmersibleZone(); break; - case KIND_RIVER: aResult = new HYDROData_River(); break; - case KIND_STREAM: aResult = new HYDROData_Stream(); break; - case KIND_CONFLUENCE: aResult = new HYDROData_Confluence(); break; - case KIND_CHANNEL: aResult = new HYDROData_Channel(); break; - case KIND_OBSTACLE: aResult = new HYDROData_Obstacle(); break; - case KIND_DIGUE: aResult = new HYDROData_Digue(); break; - case KIND_PROFILE: aResult = new HYDROData_Profile(); break; - case KIND_PROFILEUZ: aResult = new HYDROData_ProfileUZ(); break; - case KIND_POLYLINEXY: aResult = new HYDROData_PolylineXY(); break; - case KIND_CALCULATION: aResult = new HYDROData_CalculationCase(); break; - case KIND_REGION: aResult = new HYDROData_Region(); break; - case KIND_ZONE: aResult = new HYDROData_Zone(); break; - case KIND_VISUAL_STATE: aResult = new HYDROData_VisualState(); break; - case KIND_DUMMY_3D: aResult = new HYDROData_DummyObject3D(); break; - case KIND_SHAPES_GROUP: aResult = new HYDROData_ShapesGroup(); break; - case KIND_SPLITTED_GROUP: aResult = new HYDROData_SplittedShapesGroup();break; - default: break; + case KIND_IMAGE: aResult = new HYDROData_Image(); break; + case KIND_POLYLINE: aResult = new HYDROData_Polyline3D(); break; + case KIND_BATHYMETRY: aResult = new HYDROData_Bathymetry(); break; + case KIND_ALTITUDE: aResult = new HYDROData_AltitudeObject(); break; + case KIND_IMMERSIBLE_ZONE: aResult = new HYDROData_ImmersibleZone(); break; + case KIND_RIVER: aResult = new HYDROData_River(); break; + case KIND_STREAM: aResult = new HYDROData_Stream(); break; + case KIND_CONFLUENCE: aResult = new HYDROData_Confluence(); break; + case KIND_CHANNEL: aResult = new HYDROData_Channel(); break; + case KIND_OBSTACLE: aResult = new HYDROData_Obstacle(); break; + case KIND_DIGUE: aResult = new HYDROData_Digue(); break; + case KIND_PROFILE: aResult = new HYDROData_Profile(); break; + case KIND_PROFILEUZ: aResult = new HYDROData_ProfileUZ(); break; + case KIND_POLYLINEXY: aResult = new HYDROData_PolylineXY(); break; + case KIND_CALCULATION: aResult = new HYDROData_CalculationCase(); break; + case KIND_REGION: aResult = new HYDROData_Region(); break; + case KIND_ZONE: aResult = new HYDROData_Zone(); break; + case KIND_VISUAL_STATE: aResult = new HYDROData_VisualState(); break; + case KIND_DUMMY_3D: aResult = new HYDROData_DummyObject3D(); break; + case KIND_SHAPES_GROUP: aResult = new HYDROData_ShapesGroup(); break; + case KIND_SPLITTED_GROUP: aResult = new HYDROData_SplittedShapesGroup(); break; + case KIND_STREAM_ALTITUDE: aResult = new HYDROData_StreamAltitude(); break; + case KIND_OBSTACLE_ALTITUDE: aResult = new HYDROData_ObstacleAltitude(); break; + default: break; } if ( !aResult.IsNull() ) diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index 970b62d7..f9203411 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -3,6 +3,7 @@ #include "HYDROData_DummyObject3D.h" #include "HYDROData_ShapesGroup.h" +#include "HYDROData_Tool.h" #include "HYDROData_Iterator.h" #include "HYDROData_IAltitudeObject.h" @@ -39,16 +40,16 @@ void HYDROData_Object::SetName( const QString& theName ) if ( aGroup.IsNull() ) continue; - QString aGroupName = aGroup->GetName(); - if ( anOldObjName.isEmpty() ) - aGroupName.prepend( theName + "_" ); - else if ( aGroupName.startsWith( anOldObjName ) ) - aGroupName.replace( anOldObjName, theName ); - else - continue; - - aGroup->SetName( aGroupName ); + HYDROData_Tool::UpdateChildObjectName( anOldObjName, theName, aGroup ); } + + Handle(HYDROData_DummyObject3D) anObject3D = GetObject3D(); + if ( !anObject3D.IsNull() ) + HYDROData_Tool::UpdateChildObjectName( anOldObjName, theName, anObject3D ); + + Handle(HYDROData_IAltitudeObject) anAltitudeObj = getChildAltitudeObject(); + if ( !anAltitudeObj.IsNull() ) + HYDROData_Tool::UpdateChildObjectName( anOldObjName, theName, anAltitudeObj ); } HYDROData_Entity::SetName( theName ); @@ -60,6 +61,7 @@ void HYDROData_Object::Update() removeTopShape(); removeShape3D(); removeGroupObjects(); + checkAndSetAltitudeObject(); } HYDROData_SequenceOfObjects HYDROData_Object::GetAllReferenceObjects() const @@ -206,6 +208,54 @@ QColor HYDROData_Object::getDefaultBorderColor() const return DefaultBorderColor(); } +ObjectKind HYDROData_Object::getAltitudeObjectType() const +{ + return KIND_UNKNOWN; +} + +Handle(HYDROData_IAltitudeObject) HYDROData_Object::getChildAltitudeObject() const +{ + Handle(HYDROData_IAltitudeObject) anObject; + + TDF_Label aLabel = myLab.FindChild( DataTag_ChildAltitudeObject, false ); + if ( !aLabel.IsNull() ) + { + TDF_Label aChildLabel = aLabel.FindChild( 0, false ); + if ( !aChildLabel.IsNull() ) + { + anObject = Handle(HYDROData_IAltitudeObject)::DownCast( + HYDROData_Iterator::Object( aChildLabel ) ); + } + } + + return anObject; +} + +void HYDROData_Object::checkAndSetAltitudeObject() +{ + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); + + ObjectKind anAltitudeObjectType = getAltitudeObjectType(); + if ( anAltitudeObjectType == KIND_UNKNOWN ) + return; // No need to create altitude object + + TDF_Label aLabel = myLab.FindChild( DataTag_ChildAltitudeObject, false ); + if ( !aLabel.IsNull() ) + return; + + TDF_Label aChildLabel = myLab.FindChild( DataTag_ChildAltitudeObject ).FindChild( 0 ); + + Handle(HYDROData_IAltitudeObject) anAltitudeObject = + Handle(HYDROData_IAltitudeObject)::DownCast( + HYDROData_Iterator::CreateObject( aChildLabel, anAltitudeObjectType ) ); + + QString anAltitudePref = GetName() + "_Altitude"; + QString anAltitudeName = HYDROData_Tool::GenerateObjectName( aDocument, anAltitudePref ); + anAltitudeObject->SetName( anAltitudeName ); + + SetAltitudeObject( anAltitudeObject ); +} + Handle(HYDROData_ShapesGroup) HYDROData_Object::createGroupObject() { TDF_Label aNewLab = myLab.FindChild( DataTag_EdgesGroup ).NewChild(); diff --git a/src/HYDROData/HYDROData_Object.h b/src/HYDROData/HYDROData_Object.h index 0e19876d..642ce06f 100644 --- a/src/HYDROData/HYDROData_Object.h +++ b/src/HYDROData/HYDROData_Object.h @@ -27,11 +27,12 @@ protected: DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve DataTag_TopShape, DataTag_Shape3D, - DataTag_AltitudeObject, ///< reference altitude object - DataTag_FillingColor, ///< filling color of geometrical object - DataTag_BorderColor, ///< border color of geometrical object - DataTag_Object3D, ///< child 3D object - DataTag_EdgesGroup, ///< child group objects + DataTag_AltitudeObject, ///< reference altitude object + DataTag_FillingColor, ///< filling color of geometrical object + DataTag_BorderColor, ///< border color of geometrical object + DataTag_Object3D, ///< child 3D object + DataTag_EdgesGroup, ///< child group objects + DataTag_ChildAltitudeObject, ///< child altitude object }; public: @@ -174,6 +175,26 @@ protected: HYDRODATA_EXPORT virtual void checkAndSetObject3D(); + /** + * Returns the type of child altitude object. + * Base implementation returns KIND_UNKNOWN, it means that child altitude + * object will not be created inside of checkAndSetAltitudeObject() function. + * Reimplement this function in your subclass an return correct altitude + * object type if you want to create child altitude object. + */ + HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const; + + /** + * Checks and if necessary create child altitude object. + */ + HYDRODATA_EXPORT virtual void checkAndSetAltitudeObject(); + + /** + * Return the child altitude object. + */ + HYDRODATA_EXPORT virtual Handle(HYDROData_IAltitudeObject) getChildAltitudeObject() const; + + /** * Create new one child group object. */ diff --git a/src/HYDROData/HYDROData_Obstacle.cxx b/src/HYDROData/HYDROData_Obstacle.cxx index 345c14a7..f66444e7 100644 --- a/src/HYDROData/HYDROData_Obstacle.cxx +++ b/src/HYDROData/HYDROData_Obstacle.cxx @@ -368,6 +368,10 @@ void HYDROData_Obstacle::createGroupObjects() } } +ObjectKind HYDROData_Obstacle::getAltitudeObjectType() const +{ + return KIND_OBSTACLE_ALTITUDE; +} diff --git a/src/HYDROData/HYDROData_Obstacle.h b/src/HYDROData/HYDROData_Obstacle.h index 39b7d584..2b51e06e 100644 --- a/src/HYDROData/HYDROData_Obstacle.h +++ b/src/HYDROData/HYDROData_Obstacle.h @@ -122,6 +122,12 @@ protected: */ HYDRODATA_EXPORT virtual void createGroupObjects(); + /** + * Returns the type of child altitude object. + * Reimplemented to create obstacle altitude object. + */ + virtual ObjectKind getAltitudeObjectType() const; + protected: friend class HYDROData_Iterator; diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.cxx b/src/HYDROData/HYDROData_ObstacleAltitude.cxx new file mode 100644 index 00000000..1a9b428a --- /dev/null +++ b/src/HYDROData/HYDROData_ObstacleAltitude.cxx @@ -0,0 +1,52 @@ + +#include "HYDROData_ObstacleAltitude.h" +#include "HYDROData_Document.h" + +#include + +#define PYTHON_OBSTACLE_ALTITUDE_ID "KIND_OBSTACLE_ALTITUDE" + + +IMPLEMENT_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) +IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) + +HYDROData_ObstacleAltitude::HYDROData_ObstacleAltitude() +: HYDROData_IAltitudeObject() +{ +} + +HYDROData_ObstacleAltitude::~HYDROData_ObstacleAltitude() +{ +} + +QStringList HYDROData_ObstacleAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +{ + QStringList aResList; + + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); + if ( aDocument.IsNull() ) + return aResList; + + QString aDocName = aDocument->GetDocPyName(); + QString anAltitudeName = GetName(); + + aResList << QString( "%1 = %2.CreateObject( %3 );" ) + .arg( anAltitudeName ).arg( aDocName ).arg( PYTHON_OBSTACLE_ALTITUDE_ID ); + aResList << QString( "%1.SetName( \"%2\" );" ) + .arg( anAltitudeName ).arg( anAltitudeName ); + + // TODO + + return aResList; +} + +double HYDROData_ObstacleAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) const +{ + double aResAltitude = GetInvalidAltitude(); + + return aResAltitude; +} + + + + diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.h b/src/HYDROData/HYDROData_ObstacleAltitude.h new file mode 100644 index 00000000..17addefe --- /dev/null +++ b/src/HYDROData/HYDROData_ObstacleAltitude.h @@ -0,0 +1,70 @@ + +#ifndef HYDROData_ObstacleAltitude_HeaderFile +#define HYDROData_ObstacleAltitude_HeaderFile + + +#include "HYDROData_IAltitudeObject.h" + + +DEFINE_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) + + +/**\class HYDROData_ObstacleAltitude + * \brief Class that stores/retreives information about the obstacle altitude. + * + */ +class HYDROData_ObstacleAltitude : public HYDROData_IAltitudeObject +{ +protected: + + /** + * Enumeration of tags corresponding to the persistent object parameters. + */ + enum DataTag + { + DataTag_First = HYDROData_IAltitudeObject::DataTag_First + 100, ///< first tag, to reserve + }; + +public: + + DEFINE_STANDARD_RTTI(HYDROData_ObstacleAltitude); + + /** + * Returns the kind of this object. + */ + HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_OBSTACLE_ALTITUDE; } + + + /** + * Dump Altitude object to Python script representation. + */ + HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; + +public: + + // Public methods to work with altitudes. + + /** + * Returns altitude for given point. + * \param thePoint the point to examine + * \return altitude value + */ + HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const; + +protected: + + friend class HYDROData_Iterator; + + /** + * Creates new object in the internal data structure. Use higher level objects + * to create objects with real content. + */ + HYDRODATA_EXPORT HYDROData_ObstacleAltitude(); + + /** + * Destructs properties of the object and object itself, removes it from the document. + */ + HYDRODATA_EXPORT ~HYDROData_ObstacleAltitude(); +}; + +#endif diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 93640008..2fb2adb4 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -771,6 +771,11 @@ void HYDROData_Stream::createGroupObjects() anOutGroup->AddShape( aTopEdge ); } +ObjectKind HYDROData_Stream::getAltitudeObjectType() const +{ + return KIND_STREAM_ALTITUDE; +} + void HYDROData_Stream::setParametersArray( const TColStd_Array1OfReal& theArray ) { if ( theArray.Length() == 0 ) diff --git a/src/HYDROData/HYDROData_Stream.h b/src/HYDROData/HYDROData_Stream.h index 461b3b4f..4f364406 100644 --- a/src/HYDROData/HYDROData_Stream.h +++ b/src/HYDROData/HYDROData_Stream.h @@ -151,7 +151,13 @@ protected: /** * Create all necessary child group objects. */ - HYDRODATA_EXPORT virtual void createGroupObjects(); + virtual void createGroupObjects(); + + /** + * Returns the type of child altitude object. + * Reimplemented to create stream altitude object. + */ + virtual ObjectKind getAltitudeObjectType() const; /** * Builds b-spline using interpolation algorithm. @@ -161,12 +167,12 @@ protected: /** * Returns default filling color for new object. */ - HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const; + virtual QColor getDefaultFillingColor() const; /** * Returns default border color for new object. */ - HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const; + virtual QColor getDefaultBorderColor() const; private: diff --git a/src/HYDROData/HYDROData_StreamAltitude.cxx b/src/HYDROData/HYDROData_StreamAltitude.cxx new file mode 100644 index 00000000..b701b3af --- /dev/null +++ b/src/HYDROData/HYDROData_StreamAltitude.cxx @@ -0,0 +1,52 @@ + +#include "HYDROData_StreamAltitude.h" +#include "HYDROData_Document.h" + +#include + +#define PYTHON_STREAM_ALTITUDE_ID "KIND_STREAM_ALTITUDE" + + +IMPLEMENT_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) +IMPLEMENT_STANDARD_RTTIEXT(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) + +HYDROData_StreamAltitude::HYDROData_StreamAltitude() +: HYDROData_IAltitudeObject() +{ +} + +HYDROData_StreamAltitude::~HYDROData_StreamAltitude() +{ +} + +QStringList HYDROData_StreamAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +{ + QStringList aResList; + + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); + if ( aDocument.IsNull() ) + return aResList; + + QString aDocName = aDocument->GetDocPyName(); + QString anAltitudeName = GetName(); + + aResList << QString( "%1 = %2.CreateObject( %3 );" ) + .arg( anAltitudeName ).arg( aDocName ).arg( PYTHON_STREAM_ALTITUDE_ID ); + aResList << QString( "%1.SetName( \"%2\" );" ) + .arg( anAltitudeName ).arg( anAltitudeName ); + + // TODO + + return aResList; +} + +double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) const +{ + double aResAltitude = GetInvalidAltitude(); + + return aResAltitude; +} + + + + diff --git a/src/HYDROData/HYDROData_StreamAltitude.h b/src/HYDROData/HYDROData_StreamAltitude.h new file mode 100644 index 00000000..4304545d --- /dev/null +++ b/src/HYDROData/HYDROData_StreamAltitude.h @@ -0,0 +1,70 @@ + +#ifndef HYDROData_StreamAltitude_HeaderFile +#define HYDROData_StreamAltitude_HeaderFile + + +#include "HYDROData_IAltitudeObject.h" + + +DEFINE_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) + + +/**\class HYDROData_StreamAltitude + * \brief Class that stores/retreives information about the stream altitude. + * + */ +class HYDROData_StreamAltitude : public HYDROData_IAltitudeObject +{ +protected: + + /** + * Enumeration of tags corresponding to the persistent object parameters. + */ + enum DataTag + { + DataTag_First = HYDROData_IAltitudeObject::DataTag_First + 100, ///< first tag, to reserve + }; + +public: + + DEFINE_STANDARD_RTTI(HYDROData_StreamAltitude); + + /** + * Returns the kind of this object. + */ + HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_STREAM_ALTITUDE; } + + + /** + * Dump Altitude object to Python script representation. + */ + HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; + +public: + + // Public methods to work with altitudes. + + /** + * Returns altitude for given point. + * \param thePoint the point to examine + * \return altitude value + */ + HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const; + +protected: + + friend class HYDROData_Iterator; + + /** + * Creates new object in the internal data structure. Use higher level objects + * to create objects with real content. + */ + HYDRODATA_EXPORT HYDROData_StreamAltitude(); + + /** + * Destructs properties of the object and object itself, removes it from the document. + */ + HYDRODATA_EXPORT ~HYDROData_StreamAltitude(); +}; + +#endif