2 #ifndef HYDROData_IPolyline_HeaderFile
3 #define HYDROData_IPolyline_HeaderFile
5 #include "HYDROData_Entity.h"
7 #include <CurveCreator.hxx>
8 #include <CurveCreator_ICurve.hxx>
10 DEFINE_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity)
13 class Handle(TDataStd_RealList);
14 class Handle(TDataStd_ExtStringList);
15 class Handle(TDataStd_IntegerList);
16 class Handle(TDataStd_BooleanList);
18 /**\class HYDROData_IPolyline
19 * \brief Base class that stores/retreives information about the 2D points.
21 class HYDROData_IPolyline : public HYDROData_Entity, public CurveCreator_ICurve
26 * Enumeration of tags corresponding to the persistent object parameters.
30 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
37 * Enumeration of tags corresponding to the operations child lable
41 OperationsTag_Commited,
46 DEFINE_STANDARD_RTTI(HYDROData_IPolyline);
49 * Returns the 3D presentation of all points.
51 HYDRODATA_EXPORT virtual ListAISObjects constructWire() const = 0;
56 // Implementation of ICurvePolyline interface
58 /***********************************************/
59 /*** Undo/Redo methods ***/
60 /***********************************************/
62 //! Get number of available undo operations
63 HYDRODATA_EXPORT virtual int getNbUndo() const;
65 //! Undo previous operation
66 HYDRODATA_EXPORT virtual bool undo();
68 //! Get number of available redo operations
69 HYDRODATA_EXPORT virtual int getNbRedo() const;
71 //! Redo last previously "undone" operation
72 HYDRODATA_EXPORT virtual bool redo();
75 /***********************************************/
76 /*** Point methods ***/
77 /***********************************************/
79 //! Get the dimension.
80 HYDRODATA_EXPORT virtual CurveCreator::Dimension getDimension() const;
83 //! Get coordinates of specified point
84 HYDRODATA_EXPORT virtual CurveCreator::Coordinates getPoint( const int theISection,
85 const int theIPnt ) const;
88 * Get number of points in specified section or (the total number of points
89 * in Curve if theISection is equal to -1).
91 HYDRODATA_EXPORT virtual int getNbPoints( const int theISection = -1 ) const;
96 void startOperation();
98 void commitOperation();
100 void abortOperation();
103 void setNbOperations( const int theNb );
105 int getNbOperations() const;
108 void setNbUndoedOperations( const int theNb );
110 int getNbUndoedOperations() const;
113 void getSectionsLists( Handle(TDataStd_ExtStringList)& theNamesList,
114 Handle(TDataStd_IntegerList)& theTypesList,
115 Handle(TDataStd_BooleanList)& theClosuresList,
116 const bool theIsCreate = true ) const;
118 void removeSectionsLists();
121 void getPointsLists( const int theSectionIndex,
122 Handle(TDataStd_RealList)& theListX,
123 Handle(TDataStd_RealList)& theListY,
124 const bool theIsCreate = true ) const;
126 void removePointsLists( const int theSectionIndex = -1 );
131 * Creates new object in the internal data structure. Use higher level objects
132 * to create objects with real content.
134 HYDRODATA_EXPORT HYDROData_IPolyline();
137 * Destructs properties of the object and object itself, removes it from the document.
139 HYDRODATA_EXPORT ~HYDROData_IPolyline();