Salome HOME
6.12.2013.Fix of HasIntersection method.
[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 list of all reference objects of this object.
44    */
45   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
46
47   /**
48    * Returns the top shape of the object.
49    */
50   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
51
52   /**
53    * Returns the 3d shape of the object.
54    */
55   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
56
57   /**
58    * Update the shape presentations of stream.
59    * Call this method whenever you made changes for channel data.
60    */
61   HYDRODATA_EXPORT virtual void Update();
62
63
64 public:      
65   // Public methods to work with Channel
66   
67   /**
68    * Sets reference guide line object for channel.
69    */
70   HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
71
72   /**
73    * Returns reference guide line object of channel.
74    */
75   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
76
77   /**
78    * Remove reference guide line object from channel.
79    */
80   HYDRODATA_EXPORT virtual void RemoveGuideLine();
81
82
83   /**
84    * Sets reference profile object for channel.
85    */
86   HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
87
88   /**
89    * Returns reference profile object of channel.
90    */
91   HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
92
93   /**
94    * Remove reference profile object from channel.
95    */
96   HYDRODATA_EXPORT virtual void RemoveProfile();
97
98
99 protected:
100
101   friend class HYDROData_Iterator;
102
103   /**
104    * Creates new object in the internal data structure. Use higher level objects 
105    * to create objects with real content.
106    */
107   HYDRODATA_EXPORT HYDROData_Channel();
108
109   /**
110    * Destructs properties of the object and object itself, removes it from the document.
111    */
112   virtual HYDRODATA_EXPORT ~HYDROData_Channel();
113 };
114
115 #endif