From 9cbe8a1e6a60dfdb0554901eda8299f880c1c012 Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 30 Mar 2015 09:38:16 +0300 Subject: [PATCH] refs #493: add data model methods stubs --- src/HYDROData/HYDROData_IProfilesInterpolator.cxx | 5 +++++ src/HYDROData/HYDROData_IProfilesInterpolator.h | 2 ++ src/HYDROData/HYDROData_Stream.cxx | 6 ++++++ src/HYDROData/HYDROData_Stream.h | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/src/HYDROData/HYDROData_IProfilesInterpolator.cxx b/src/HYDROData/HYDROData_IProfilesInterpolator.cxx index 6a5ef3b4..f0c8d420 100644 --- a/src/HYDROData/HYDROData_IProfilesInterpolator.cxx +++ b/src/HYDROData/HYDROData_IProfilesInterpolator.cxx @@ -71,6 +71,11 @@ void HYDROData_IProfilesInterpolator::SetResultProfilesNumber( const int theNumb myResultProfilesNumber = theNumber; } +int HYDROData_IProfilesInterpolator::GetCalculatedProfilesNumber() const +{ + return myResultProfiles.size(); +} + std::vector HYDROData_IProfilesInterpolator::GetResultProfile( const int theProfileIndex ) const { std::vector aResultProfile; diff --git a/src/HYDROData/HYDROData_IProfilesInterpolator.h b/src/HYDROData/HYDROData_IProfilesInterpolator.h index da91b2da..1b4ec9cd 100644 --- a/src/HYDROData/HYDROData_IProfilesInterpolator.h +++ b/src/HYDROData/HYDROData_IProfilesInterpolator.h @@ -108,6 +108,8 @@ public: */ HYDRODATA_EXPORT virtual InterpolationError Calculate() = 0; + HYDRODATA_EXPORT virtual int GetCalculatedProfilesNumber() const; + /** * Get result profile by index. * \param theProfileIndex the profile index [0, ] diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 656e1b02..bf517b24 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -1121,3 +1121,9 @@ Handle(HYDROData_Polyline3D) HYDROData_Stream::GetBottomPolyline() const return Handle(HYDROData_Polyline3D)::DownCast( GetReferenceObject( DataTag_BottomPolyline ) ); } + +bool HYDROData_Stream::Interpolate( const HYDROData_IProfilesInterpolator* theInterpolator ) +{ + ///< \todo this is just a stub + return true; +} \ No newline at end of file diff --git a/src/HYDROData/HYDROData_Stream.h b/src/HYDROData/HYDROData_Stream.h index 4af7d1c6..800438fe 100644 --- a/src/HYDROData/HYDROData_Stream.h +++ b/src/HYDROData/HYDROData_Stream.h @@ -35,8 +35,10 @@ DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject) class Handle(HYDROData_PolylineXY); class Handle(HYDROData_Polyline3D); class Handle(HYDROData_Profile); +class HYDROData_IProfilesInterpolator; class TColStd_Array1OfReal; + /**\class HYDROData_Stream * \brief * @@ -242,6 +244,13 @@ public: * Returns reference bottom polyline object of stream. */ HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetBottomPolyline() const; + + /** + * Add interpolated profiles into the stream. + * \param theInterpolator the interpolator + * \return true in case of success + */ + HYDRODATA_EXPORT virtual bool Interpolate( const HYDROData_IProfilesInterpolator* theInterpolator ); protected: -- 2.39.2