2 #ifndef HYDROData_ProfileUZ_HeaderFile
3 #define HYDROData_ProfileUZ_HeaderFile
5 #include "HYDROData_IPolyline.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline)
9 /**\class HYDROData_ProfileUZ
10 * \brief Class that stores/retreives information about the
11 * parametric profile points.
13 class HYDROData_ProfileUZ : public HYDROData_IPolyline
17 * Enumeration of tags corresponding to the persistent object parameters.
21 DataTag_First = HYDROData_IPolyline::DataTag_First + 100, ///< first tag, to reserve
25 DEFINE_STANDARD_RTTI(HYDROData_ProfileUZ);
29 * Returns the kind of this object. Must be redefined in all objects of known type.
31 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_PROFILEUZ;}
36 * Returns the 3D presentation of all points.
38 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape();
42 * Returns number of sections.
44 HYDRODATA_EXPORT virtual int NbSections() const;
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
52 HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName,
53 const SectionType theSectionType,
54 const bool theIsClosed );
57 * Returns name of section with given index.
58 * \param theSectionIndex index of section
60 HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const;
63 * Set name for section with given index.
64 * \param theSectionIndex index of section
65 * \param theSectionName new section name
67 HYDRODATA_EXPORT virtual void SetSectionName( const int theSectionIndex,
68 const TCollection_AsciiString& theSectionName );
71 * Returns type of section with given index.
72 * \param theSectionIndex index of section
74 HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const;
77 * Set type for section with given index.
78 * \param theSectionIndex index of section
79 * \param theSectionType new section type
81 HYDRODATA_EXPORT virtual void SetSectionType( const int theSectionIndex,
82 const SectionType theSectionType );
85 * Returns true if section with given index is closed.
86 * \param theSectionIndex index of section
88 HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
91 * Set closed flag for section with given index.
92 * \param theSectionIndex index of section
93 * \param theIsClosed new closures state
95 HYDRODATA_EXPORT virtual void SetSectionClosed( const int theSectionIndex,
96 const bool theIsClosed );
99 * Removes section with given index.
100 * \param theSectionIndex index of section
102 HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
105 * Removes all sections.
107 HYDRODATA_EXPORT virtual void RemoveSections();
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
116 HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex,
117 const Point& thePoint,
118 const int thePointIndex = -1 );
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
126 HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex,
127 const Point& thePoint,
128 const int thePointIndex );
131 * Removes point from section with index "theSectionIndex".
132 * \param theSectionIndex index of section
133 * \param thePointIndex index of point
135 HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
136 const int thePointIndex );
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
145 HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
149 friend class HYDROData_Iterator;
152 * Creates new object in the internal data structure. Use higher level objects
153 * to create objects with real content.
155 HYDRODATA_EXPORT HYDROData_ProfileUZ();
158 * Destructs properties of the object and object itself, removes it from the document.
160 HYDRODATA_EXPORT ~HYDROData_ProfileUZ();