X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Stream.h;h=c65e319360abf23e2ccc34a5666efdf3041b106e;hb=84ec5b92ea05194a9d4d413b9bc896cf68d2e3ca;hp=34d70a244b42204a49a33f2b9ee25cba366a34d7;hpb=7b9454f8053b968f127bf7981eb05b6749e261f4;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Stream.h b/src/HYDROData/HYDROData_Stream.h index 34d70a24..c65e3193 100644 --- a/src/HYDROData/HYDROData_Stream.h +++ b/src/HYDROData/HYDROData_Stream.h @@ -6,6 +6,9 @@ DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject) +class Handle(HYDROData_PolylineXY); +class Handle(HYDROData_Profile); + /**\class HYDROData_Stream * \brief * @@ -19,6 +22,8 @@ protected: enum DataTag { DataTag_First = HYDROData_NaturalObject::DataTag_First + 100, ///< first tag, to reserve + DataTag_HydraulicAxis, ///< reference hydraulic axis + DataTag_Profile, ///< reference profiles }; public: @@ -44,6 +49,72 @@ public: */ HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const; + /** + * Update the shape presentations of stream. + * Call this method whenever you made changes for stream data. + */ + HYDRODATA_EXPORT virtual void Update(); + + +public: + // Public methods to work with Stream + + /** + * Sets reference hydraulic axis object for stream. + */ + HYDRODATA_EXPORT virtual bool SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis ); + + /** + * Returns reference hydraulic axis object of stream. + */ + HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetHydraulicAxis() const; + + /** + * Remove reference hydraulic axis object from stream. + */ + HYDRODATA_EXPORT virtual void RemoveHydraulicAxis(); + + + /** + * Returns true if profile has the intersection with reference hydraulic axis. + */ + HYDRODATA_EXPORT virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile ) const; + + + /** + * Add new one reference profile object for stream. + */ + HYDRODATA_EXPORT virtual bool AddProfile( const Handle(HYDROData_Profile)& theProfile ); + + /** + * Returns all reference profile objects of stream. + */ + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetProfiles() const; + + /** + * Removes reference profile object from stream. + */ + HYDRODATA_EXPORT virtual bool RemoveProfile( const Handle(HYDROData_Profile)& theProfile ); + + /** + * Removes all reference profile objects from stream. + */ + HYDRODATA_EXPORT virtual void RemoveProfiles(); + + +protected: + + /** + * Insert one profile in to the stream profiles order. + */ + void insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile ); + + /** + * Fully recompute the order of all profiles in accordance with reference hydraulic axis. + * If hydraulic axis is not set all profiles will be removed from order. + */ + void updateProfilesOrder(); + protected: friend class HYDROData_Iterator;