- if ( !myIsOperation )
- return;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return;
-
- int aNbOperations = getNbOperations();
- setNbOperations( aNbOperations + 1 );
-
- aDocument->CommitOperation();
-
- myIsOperation = false;
-}
-
-void HYDROData_IPolyline::abortOperation()
-{
- if ( !myIsOperation )
- return;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
- if ( aDocument.IsNull() )
- return;
-
- aDocument->AbortOperation();
-
- myIsOperation = false;
-}
-
-void HYDROData_IPolyline::setNbOperations( const int theNb )
-{
- TDF_Label anOpLabel = myLab.FindChild( DataTag_Operations ).FindChild( OperationsTag_Commited );
- TDataStd_Integer::Set( anOpLabel, theNb );
-}
-
-int HYDROData_IPolyline::getNbOperations() const
-{
- TDF_Label aLabel = myLab.FindChild( DataTag_Operations, false );
- if ( aLabel.IsNull() )
- return 0;
-
- TDF_Label anOpLabel = aLabel.FindChild( OperationsTag_Commited, false );
- if ( anOpLabel.IsNull() )
- return 0;
-
- Handle(TDataStd_Integer) anOpCount;
- if ( !anOpLabel.FindAttribute( TDataStd_Integer::GetID(), anOpCount ) )
- return 0;
-
- return anOpCount->Get();
+ TDF_Label aShapeLabel = myLab.FindChild( DataTag_PolylineShape, false );
+ if ( !aShapeLabel.IsNull() )
+ {
+ Handle(TNaming_NamedShape) aNamedShape;
+ if ( aShapeLabel.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
+ return aNamedShape->Get();
+ }
+ return TopoDS_Shape();