Salome HOME
Minor changes.
[modules/hydro.git] / src / HYDROData / HYDROData_Channel.h
1
2 #ifndef HYDROData_Channel_HeaderFile
3 #define HYDROData_Channel_HeaderFile
4
5 #include "HYDROData_ArtificialObject.h"
6
7 class Handle(HYDROData_Polyline3D);
8 class Handle(HYDROData_Profile);
9
10 DEFINE_STANDARD_HANDLE(HYDROData_Channel, HYDROData_ArtificialObject)
11
12 /**\class HYDROData_Channel
13  * \brief 
14  *
15  */
16 class HYDROData_Channel : public HYDROData_ArtificialObject
17 {
18 protected:
19   /**
20    * Enumeration of tags corresponding to the persistent object parameters.
21    */
22   enum DataTag
23   {
24     DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
25     DataTag_GuideLine, 
26     DataTag_Profile,
27   };
28
29 public:
30   DEFINE_STANDARD_RTTI(HYDROData_Channel);
31
32   /**
33    * Returns the kind of this object. Must be redefined in all objects of known type.
34    */
35   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_CHANNEL;}
36
37   /**
38    * Dump object to Python script representation.
39    */
40   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
41
42   /**
43    * Returns the top shape of the object.
44    */
45   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
46
47   /**
48    * Returns the 3d shape of the object.
49    */
50   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
51
52   /**
53    * Update the shape presentations of stream.
54    * Call this method whenever you made changes for channel data.
55    */
56   HYDRODATA_EXPORT virtual void Update();
57
58
59 public:      
60   // Public methods to work with Channel
61   
62   /**
63    * Sets reference guide line object for channel.
64    */
65   HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
66
67   /**
68    * Returns reference guide line object of channel.
69    */
70   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
71
72   /**
73    * Remove reference guide line object from channel.
74    */
75   HYDRODATA_EXPORT virtual void RemoveGuideLine();
76
77
78   /**
79    * Sets reference profile object for channel.
80    */
81   HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
82
83   /**
84    * Returns reference profile object of channel.
85    */
86   HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
87
88   /**
89    * Remove reference profile object from channel.
90    */
91   HYDRODATA_EXPORT virtual void RemoveProfile();
92
93
94 protected:
95
96   friend class HYDROData_Iterator;
97
98   /**
99    * Creates new object in the internal data structure. Use higher level objects 
100    * to create objects with real content.
101    */
102   HYDRODATA_EXPORT HYDROData_Channel();
103
104   /**
105    * Destructs properties of the object and object itself, removes it from the document.
106    */
107   virtual HYDRODATA_EXPORT ~HYDROData_Channel();
108 };
109
110 #endif