Salome HOME
Minor changes.
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_ICurve.hxx
index 5f269c864cbc1cb28e63e7d3e636a598adc8add5..9effa478a0db3ef2ae5107ac27d1a389a7d7e8c6 100644 (file)
 
 #include "CurveCreator_Macro.hxx"
 #include <deque>
+#include <vector>
 #include <string>
+#include <list>
+
+class Handle_AIS_InteractiveObject;
 
 namespace CurveCreator
 {
@@ -54,6 +58,12 @@ namespace CurveCreator
  */
 class CURVECREATOR_EXPORT CurveCreator_ICurve
 {
+public:
+  typedef std::pair<int,int> SectionToPoint;
+  typedef std::deque<SectionToPoint> SectionToPointList;
+
+  typedef std::deque< std::pair< SectionToPoint,std::deque< float > > > SectionToPointCoordsList;
+
 public:
   /***********************************************/
   /***          Undo/Redo methods              ***/
@@ -79,9 +89,9 @@ public:
   //! Clear the polyline (remove all sections)
   virtual bool clear() = 0;
 
-  //! Join range of sections to one section (join all sections if -1 is passed in one of arguments)
-  virtual bool join( const int theISectionTo = -1, 
-                     const int theISectionFrom = -1 ) = 0;
+  //! Join list of sections to one section (join all if the list is empty)
+  // The first section in the list is a leader, another sections are joined to it
+  virtual bool join( const std::list<int>& theSections ) = 0;
 
   //! Get number of sections
   virtual int getNbSections() const = 0;
@@ -141,9 +151,15 @@ public:
   virtual bool setPoint( const int theISection,
                          const int theIPnt,
                          const std::deque<float>& theNewCoords ) = 0;
+  
+  //! Set coordinates of specified points from different sections
+  virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords,
+                                 const bool theIsToSaveDiff = true ) = 0;
 
   //! Remove point with given id
   virtual bool removePoint( const int theISection, const int theIPnt = -1 ) = 0;
+  //! Remove several points from different sections
+  virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs) = 0;
 
   //! Get coordinates of specified point
   virtual std::deque<float> getPoint( const int theISection, 
@@ -160,11 +176,31 @@ public:
    */
   virtual int getNbPoints( const int theISection ) const = 0;
 
+  /**
+   * Set skip sorting flag. If the flag is true - points sorting will be skipped.
+   */
+  virtual void setSkipSorting( const bool ) = 0;
+
+  /**
+   * Indicates whether the points can be sorted.
+   */
+  virtual bool canPointsBeSorted() = 0;
+
+  /**
+   * Saves points coordinates difference.
+   * \param theOldCoords the old points coordinates
+   */
+  virtual void saveCoordDiff( const SectionToPointCoordsList &theOldCoords ) = 0;
 
   /***********************************************/
   /***       Presentation methods              ***/
   /***********************************************/
-//  virtual TopoDS_Wire constructWire() const = 0;
+
+  virtual Handle_AIS_InteractiveObject getAISObject( const bool theNeedToBuild = false ) const = 0;
+
+protected:
+  virtual void constructAISObject() = 0;
+
 };
 
 #endif