-int HYDROData_IPolyline::getNbUndo() const
-{
- return getNbOperations();
-}
-
-bool HYDROData_IPolyline::undo()
-{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return false;
-
- if ( getNbUndo() < 1 )
- return false;
-
- aDocument->Undo();
-
- int aNbUndoedOperations = getNbUndoedOperations();
- setNbUndoedOperations( aNbUndoedOperations + 1 );
-
- return true;
-}
-
-int HYDROData_IPolyline::getNbRedo() const
-{
- return getNbUndoedOperations();
-}
-
-bool HYDROData_IPolyline::redo()
-{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return false;
-
- if ( getNbRedo() < 1 )
- return false;
-
- aDocument->Redo();
-
- int aNbUndoedOperations = getNbUndoedOperations();
- setNbUndoedOperations( aNbUndoedOperations - 1 );
-
- return true;
-}
-
-CurveCreator::Dimension HYDROData_IPolyline::getDimension() const
-{
- return CurveCreator::Dim2d;
-}
-
-CurveCreator::Coordinates HYDROData_IPolyline::getPoint( const int theISection,
- const int theIPnt ) const
-{
- CurveCreator::Coordinates aResPoint;
- if ( theISection < 0 || theIPnt < 0 )
- return aResPoint;
-
- CurveCreator::Coordinates aSectPoints = getPoints( theISection );
- if ( theIPnt >= aSectPoints.size() )
- return aResPoint;
-
- CurveCreator::Coordinates::reverse_iterator anIt = aSectPoints.rbegin();
-
- aResPoint.push_back( *anIt++ );
- aResPoint.push_back( *anIt );
-
- return aResPoint;
-}
-
-
-int HYDROData_IPolyline::getNbPoints( const int theSectionIndex ) const