Salome HOME
another z layer for hilight presentation
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Profile.hxx
index 288732c603facc41e28ccca99751bd4c1759ef3c..f426fba00e3de200949139c05db68f0694df0cbf 100644 (file)
@@ -50,8 +50,7 @@ public:
   virtual bool clearInternal();
 
   //! For internal use only! Undo/Redo are not used here.
-  virtual bool joinInternal( const int theISectionTo = -1, 
-                             const int theISectionFrom = -1 );
+  virtual bool joinInternal( const std::list<int>& theSections );
 
   //! For internal use only! Undo/Redo are not used here.
   virtual bool moveSectionInternal( const int theISection,
@@ -59,10 +58,9 @@ public:
   //! Move section to new position in list
   virtual bool moveSection( const int theISection,
                             const int theNewIndex );
-
-  //! 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 );
+  //! 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 );
 
   //! For internal use only! Undo/Redo are not used here.
   virtual int addSectionInternal( const std::string &theName, 
@@ -97,18 +95,6 @@ public:
   virtual bool setClosed( const int theISection, 
                           const bool theIsClosed );
 
-  
-  //! For internal use only! Undo/Redo are not used here.
-  virtual bool setSectionTypeInternal( const int theISection, 
-                                       const CurveCreator::SectionType theType );
-  /**
-   *  Set type of the specified section (or all sections
-   *  if \a theISection is -1).
-   */
-  virtual bool setSectionType( const int theISection, 
-                               const CurveCreator::SectionType theType );
-
-
   /***********************************************/
   /***           Point methods                 ***/
   /***********************************************/
@@ -122,7 +108,28 @@ public:
   //! For internal use only! Undo/Redo are not used here.
   virtual bool setPointInternal( const CurveCreator::SectionsMap &theSectionsMap );
 
-private:
+  /**
+   *  Add one point to the specified section starting from the given theIPnt index.
+   *  Contrary to CurveCreator_Curve::addPoints(...) if \a theIPnt is -1 the right index
+   *  will be calculated automatically in accordance with X coordinate value of the point.
+   */
+  virtual bool addPoints( const CurveCreator::Coordinates &theCoords,
+                          const int theISection,
+                          const int theIPnt = -1 );
+
+  /**
+   * Indicates whether the points can be sorted.
+   */
+  virtual bool canPointsBeSorted();
+
+protected:
+  /**
+   * Converts the list of custom point position objects into a list of point indices
+   * \param thePoints an source list
+   * \param theConvPoints a converted list
+   */
+  void convert( const CurveCreator::PosPointsList& thePoints,
+                std::list<int>& theConvPoints );
 
 };