2 #ifndef HYDROData_Stream_HeaderFile
3 #define HYDROData_Stream_HeaderFile
5 #include "HYDROData_NaturalObject.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject)
9 class Handle(HYDROData_PolylineXY);
10 class Handle(HYDROData_Profile);
12 /**\class HYDROData_Stream
16 class HYDROData_Stream : public HYDROData_NaturalObject
20 * Enumeration of tags corresponding to the persistent object parameters.
24 DataTag_First = HYDROData_NaturalObject::DataTag_First + 100, ///< first tag, to reserve
25 DataTag_HydraulicAxis, ///< reference hydraulic axis
26 DataTag_Profile, ///< reference profiles
30 DEFINE_STANDARD_RTTI(HYDROData_Stream);
33 * Returns the kind of this object. Must be redefined in all objects of known type.
35 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_STREAM;}
38 * Dump object to Python script representation.
40 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
43 * Returns the list of all reference objects of this object.
45 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
48 * Returns the top shape of the object.
50 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
53 * Returns the 3d shape of the object.
55 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
58 * Update the shape presentations of stream.
59 * Call this method whenever you made changes for stream data.
61 HYDRODATA_EXPORT virtual void Update();
65 // Public methods to work with Stream
68 * Sets reference hydraulic axis object for stream.
70 HYDRODATA_EXPORT virtual bool SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis );
73 * Returns reference hydraulic axis object of stream.
75 HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetHydraulicAxis() const;
78 * Remove reference hydraulic axis object from stream.
80 HYDRODATA_EXPORT virtual void RemoveHydraulicAxis();
84 * Returns true if profile has the intersection with reference hydraulic axis.
86 HYDRODATA_EXPORT virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile ) const;
90 * Add new one reference profile object for stream.
92 HYDRODATA_EXPORT virtual bool AddProfile( const Handle(HYDROData_Profile)& theProfile );
95 * Returns all reference profile objects of stream.
97 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetProfiles() const;
100 * Removes reference profile object from stream.
102 HYDRODATA_EXPORT virtual bool RemoveProfile( const Handle(HYDROData_Profile)& theProfile );
105 * Removes all reference profile objects from stream.
107 HYDRODATA_EXPORT virtual void RemoveProfiles();
113 * Insert one profile in to the stream profiles order.
115 void insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile );
118 * Fully recompute the order of all profiles in accordance with reference hydraulic axis.
119 * If hydraulic axis is not set all profiles will be removed from order.
121 void updateProfilesOrder();
125 friend class HYDROData_Iterator;
128 * Creates new object in the internal data structure. Use higher level objects
129 * to create objects with real content.
131 HYDRODATA_EXPORT HYDROData_Stream();
134 * Destructs properties of the object and object itself, removes it from the document.
136 virtual HYDRODATA_EXPORT ~HYDROData_Stream();