Salome HOME
Update mechanism is corrected (Bug #182).
[modules/hydro.git] / src / HYDROData / HYDROData_Polyline3D.h
1
2 #ifndef HYDROData_Polyline3D_HeaderFile
3 #define HYDROData_Polyline3D_HeaderFile
4
5 #include "HYDROData_Object.h"
6
7 DEFINE_STANDARD_HANDLE(HYDROData_Polyline3D, HYDROData_Object)
8
9 class Handle(HYDROData_PolylineXY);
10 class Handle(HYDROData_ProfileUZ);
11 class gp_XYZ;
12
13 /**\class HYDROData_Polyline3D
14  * \brief 
15  *
16  */
17 class HYDROData_Polyline3D : public HYDROData_Object
18 {
19 public:
20
21   typedef gp_XYZ                                Polyline3DPoint;
22   typedef NCollection_Sequence<Polyline3DPoint> Polyline3DPoints;
23
24 protected:
25   /**
26    * Enumeration of tags corresponding to the persistent object parameters.
27    */
28   enum DataTag
29   {
30     DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
31     DataTag_PolylineXY,     ///< reference hydraulic axis
32     DataTag_ProfileUZ,      ///< reference profiles
33   };
34
35 public:
36   DEFINE_STANDARD_RTTI(HYDROData_Polyline3D);
37
38   /**
39    * Returns the kind of this object. Must be redefined in all objects of known type.
40    */
41   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_POLYLINE;}
42
43   /**
44    * Dump object to Python script representation.
45    */
46   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
47
48   /**
49    * Returns the list of all reference objects of this object.
50    */
51   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
52
53   /**
54    * Returns the top shape of the object.
55    */
56   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
57
58   /**
59    * Returns the 3d shape of the object.
60    */
61   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
62
63   /**
64    * Update the shape presentations of stream.
65    * Call this method whenever you made changes for stream data.
66    */
67   HYDRODATA_EXPORT virtual void Update();
68
69
70 public:      
71   // Public methods to work with 3D polyline
72   
73   /**
74    * Sets reference x,y polyline object for 3D polyline.
75    */
76   HYDRODATA_EXPORT virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline );
77
78   /**
79    * Returns reference x,y polyline object of 3D polyline.
80    */
81   HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetPolylineXY() const;
82
83   /**
84    * Remove reference x,y polyline object from 3D polyline.
85    */
86   HYDRODATA_EXPORT virtual void RemovePolylineXY();
87
88
89   /**
90    * Sets reference u,z profile object for 3D polyline.
91    */
92   HYDRODATA_EXPORT virtual bool SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile );
93
94   /**
95    * Returns reference u,z profile object of 3D polyline.
96    */
97   HYDRODATA_EXPORT virtual Handle(HYDROData_ProfileUZ) GetProfileUZ() const;
98
99   /**
100    * Remove reference u,z profile object from 3D polyline.
101    */
102   HYDRODATA_EXPORT virtual void RemoveProfileUZ();
103
104
105 protected:
106
107   friend class HYDROData_Iterator;
108
109   /**
110    * Creates new object in the internal data structure. Use higher level objects 
111    * to create objects with real content.
112    */
113   HYDRODATA_EXPORT HYDROData_Polyline3D();
114
115   /**
116    * Destructs properties of the object and object itself, removes it from the document.
117    */
118   virtual HYDRODATA_EXPORT ~HYDROData_Polyline3D();
119 };
120
121 #endif