Salome HOME
Import of profiles corrected.
[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_STREAM;}
42
43   /**
44    * Dump object to Python script representation.
45    */
46   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
47
48   /**
49    * Returns the top shape of the object.
50    */
51   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
52
53   /**
54    * Returns the 3d shape of the object.
55    */
56   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
57
58   /**
59    * Update the shape presentations of stream.
60    * Call this method whenever you made changes for stream data.
61    */
62   HYDRODATA_EXPORT virtual void Update();
63
64
65 public:      
66   // Public methods to work with 3D polyline
67   
68   /**
69    * Sets reference x,y polyline object for 3D polyline.
70    */
71   HYDRODATA_EXPORT virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline );
72
73   /**
74    * Returns reference x,y polyline object of 3D polyline.
75    */
76   HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetPolylineXY() const;
77
78   /**
79    * Remove reference x,y polyline object from 3D polyline.
80    */
81   HYDRODATA_EXPORT virtual void RemovePolylineXY();
82
83
84   /**
85    * Sets reference u,z profile object for 3D polyline.
86    */
87   HYDRODATA_EXPORT virtual bool SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile );
88
89   /**
90    * Returns reference u,z profile object of 3D polyline.
91    */
92   HYDRODATA_EXPORT virtual Handle(HYDROData_ProfileUZ) GetProfileUZ() const;
93
94   /**
95    * Remove reference u,z profile object from 3D polyline.
96    */
97   HYDRODATA_EXPORT virtual void RemoveProfileUZ();
98
99
100 protected:
101
102   friend class HYDROData_Iterator;
103
104   /**
105    * Creates new object in the internal data structure. Use higher level objects 
106    * to create objects with real content.
107    */
108   HYDRODATA_EXPORT HYDROData_Polyline3D();
109
110   /**
111    * Destructs properties of the object and object itself, removes it from the document.
112    */
113   virtual HYDRODATA_EXPORT ~HYDROData_Polyline3D();
114 };
115
116 #endif