Salome HOME
Convert the altitude for bathymetry to negative number during it reading from the...
[modules/hydro.git] / src / HYDROData / HYDROData_ProfileUZ.h
1
2 #ifndef HYDROData_ProfileUZ_HeaderFile
3 #define HYDROData_ProfileUZ_HeaderFile
4
5 #include "HYDROData_IPolyline.h"
6
7 DEFINE_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline)
8
9 /**\class HYDROData_ProfileUZ
10  * \brief Class that stores/retreives information about the 
11  *        parametric profile points.
12  */
13 class HYDROData_ProfileUZ : public HYDROData_IPolyline
14 {
15 protected:
16   /**
17    * Enumeration of tags corresponding to the persistent object parameters.
18    */
19   enum DataTag
20   {
21     DataTag_First = HYDROData_IPolyline::DataTag_First + 100, ///< first tag, to reserve
22   };
23
24 public:
25   DEFINE_STANDARD_RTTI(HYDROData_ProfileUZ);
26
27
28   /**
29    * Returns the kind of this object. Must be redefined in all objects of known type.
30    */
31   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_PROFILEUZ;}
32
33 public:
34
35   /**
36    * Returns the 3D presentation of all points.
37    */
38   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape();
39
40
41   /**
42    * Returns number of sections.
43    */
44   HYDRODATA_EXPORT virtual int NbSections() const;
45
46   /**
47    * Adds new one section.
48    * \param theSectName name of the section
49    * \param theSectionType type of section
50    * \param theIsClosed flag indicates closures of section
51    */
52   HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName,
53                                             const SectionType              theSectionType,
54                                             const bool                     theIsClosed );
55
56   /**
57    * Returns name of section with given index.
58    * \param theSectionIndex index of section
59    */
60   HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const;
61
62   /**
63    * Set name for section with given index.
64    * \param theSectionIndex index of section
65    * \param theSectionName new section name
66    */
67   HYDRODATA_EXPORT virtual void SetSectionName( const int                      theSectionIndex, 
68                                                 const TCollection_AsciiString& theSectionName );
69
70   /**
71    * Returns type of section with given index.
72    * \param theSectionIndex index of section
73    */
74   HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const;
75
76   /**
77    * Set type for section with given index.
78    * \param theSectionIndex index of section
79    * \param theSectionType new section type
80    */
81   HYDRODATA_EXPORT virtual void SetSectionType( const int         theSectionIndex, 
82                                                 const SectionType theSectionType );
83
84   /**
85    * Returns true if section with given index is closed.
86    * \param theSectionIndex index of section
87    */
88   HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
89
90   /**
91    * Set closed flag for section with given index.
92    * \param theSectionIndex index of section
93    * \param theIsClosed new closures state
94    */
95   HYDRODATA_EXPORT virtual void SetSectionClosed( const int  theSectionIndex, 
96                                                   const bool theIsClosed );
97
98   /**
99    * Removes section with given index.
100    * \param theSectionIndex index of section
101    */
102   HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
103
104   /**
105    * Removes all sections.
106    */
107   HYDRODATA_EXPORT virtual void RemoveSections();
108
109
110   /**
111    * Adds new point for section with index "theSectionIndex".
112    * \param theSectionIndex index of section
113    * \param thePoint point to add
114    * \param theBeforeIndex if not equal -1 then insert point in this pos
115    */
116   HYDRODATA_EXPORT virtual void AddPoint( const int    theSectionIndex,
117                                           const Point& thePoint,
118                                           const int    thePointIndex = -1 );
119
120   /**
121    * Replaces point for section with index "theSectionIndex".
122    * \param theSectionIndex index of section
123    * \param thePoint new point
124    * \param thePointIndex index of point to replace
125    */
126   HYDRODATA_EXPORT virtual void SetPoint( const int    theSectionIndex,
127                                           const Point& thePoint,
128                                           const int    thePointIndex );
129
130   /**
131    * Removes point from section with index "theSectionIndex".
132    * \param theSectionIndex index of section
133    * \param thePointIndex index of point
134    */
135   HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
136                                              const int thePointIndex );
137
138
139   /**
140    * Returns list of points.
141    * \param theSectionIndex if not equal -1 then list of points returned
142    *                        only for section with this index
143    * \return list of points
144    */
145   HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
146
147 protected:
148
149   friend class HYDROData_Iterator;
150
151   /**
152    * Creates new object in the internal data structure. Use higher level objects 
153    * to create objects with real content.
154    */
155   HYDRODATA_EXPORT HYDROData_ProfileUZ();
156
157   /**
158    * Destructs properties of the object and object itself, removes it from the document.
159    */
160   HYDRODATA_EXPORT ~HYDROData_ProfileUZ();
161 };
162
163 #endif