]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Altitude objects for Obstacle, Stream and Channel objects base implementation (Bug...
authoradv <adv@opencascade.com>
Fri, 20 Dec 2013 10:31:53 +0000 (10:31 +0000)
committeradv <adv@opencascade.com>
Fri, 20 Dec 2013 10:31:53 +0000 (10:31 +0000)
15 files changed:
src/HYDROData/CMakeLists.txt
src/HYDROData/HYDROData_Channel.cxx
src/HYDROData/HYDROData_Channel.h
src/HYDROData/HYDROData_Entity.h
src/HYDROData/HYDROData_Iterator.cxx
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h
src/HYDROData/HYDROData_Obstacle.cxx
src/HYDROData/HYDROData_Obstacle.h
src/HYDROData/HYDROData_ObstacleAltitude.cxx [new file with mode: 0644]
src/HYDROData/HYDROData_ObstacleAltitude.h [new file with mode: 0644]
src/HYDROData/HYDROData_Stream.cxx
src/HYDROData/HYDROData_Stream.h
src/HYDROData/HYDROData_StreamAltitude.cxx [new file with mode: 0644]
src/HYDROData/HYDROData_StreamAltitude.h [new file with mode: 0644]

index 33fc199387ec2bdc7269792c73b602d7e3b79afd..10aeff0e724fbc36dc7c76432a4c519c5a2d7349 100644 (file)
@@ -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
index 7adfcd8d04c118be4935dbb7b119cda89d1d8312..63db110eaf40617eec36a23a1ac2174a63ed4a52 100644 (file)
@@ -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;
+}
index 155f9e394979f61b6f06d6fbb6e3eab20f60bdeb..da1fe3479b988f66ad468bc3950c81ca619866e3 100644 (file)
@@ -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;
index 9bf5894ba0710df02ee5baab55bf7350404eba50..1bd62a1b7483c53065ddf5e49227228b20c6d15b 100644 (file)
@@ -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)
 
index ae37a417c3f9d31b3ef4a4ca897bfbb46330999d..181bc496e1c6839f0accc7495ce78294d9e44752 100644 (file)
@@ -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 <TDataStd_Name.hxx>
@@ -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() )
index 970b62d7eaef94cfa290b89b6dcad2e04bf04c66..f920341142141e0cc994c316605f9e1888f732f5 100644 (file)
@@ -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();
index 0e19876dcbfd7ea34af317416e94e731b7190253..642ce06f797d0b78328a1a5afca6be1fb4ec6274 100644 (file)
@@ -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.
    */
index 345c14a7fa9010e33af31ff3a37013ca3e40248f..f66444e70da9d39e8f9ecf1b8af5418b86f66361 100644 (file)
@@ -368,6 +368,10 @@ void HYDROData_Obstacle::createGroupObjects()
   }
 }
 
+ObjectKind HYDROData_Obstacle::getAltitudeObjectType() const
+{
+  return KIND_OBSTACLE_ALTITUDE;
+}
 
 
 
index 39b7d58413e7b82d4bf0a5a8e30c61d6c3fa3f7e..2b51e06ec2abdd380722e1cfd5905267d3a0808d 100644 (file)
@@ -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 (file)
index 0000000..1a9b428
--- /dev/null
@@ -0,0 +1,52 @@
+
+#include "HYDROData_ObstacleAltitude.h"
+#include "HYDROData_Document.h"
+
+#include <QStringList>
+
+#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 (file)
index 0000000..17addef
--- /dev/null
@@ -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
index 93640008ad700a057b8bf0efa676829a29c66818..2fb2adb47ae1790871e6b0bc9de746fb0daa4ec3 100644 (file)
@@ -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 )
index 461b3b4f628a1ee276a051ebf5fd6ac5fe539603..4f3644060af53742c1ba0a8d8c70b5043a903d6c 100644 (file)
@@ -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 (file)
index 0000000..b701b3a
--- /dev/null
@@ -0,0 +1,52 @@
+
+#include "HYDROData_StreamAltitude.h"
+#include "HYDROData_Document.h"
+
+#include <QStringList>
+
+#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 (file)
index 0000000..4304545
--- /dev/null
@@ -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