#include <Interface_SignLabel.hxx>
#include <Interface_Static.hxx>
#include <Message_Messenger.hxx>
+#include <Message_ProgressScope.hxx>
#include <ShapeFix.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
//=======================================================================
Standard_Integer XSControl_TransferReader::TransferOne
- (const Handle(Standard_Transient)& ent, const Standard_Boolean rec)
+ (const Handle(Standard_Transient)& ent,
+ const Standard_Boolean rec,
+ const Message_ProgressRange& theProgress)
{
if (myActor.IsNull() || myModel.IsNull()) return 0;
// seule difference entre TransferRoots et TransferOne
Standard_Integer res = 0;
Handle(Standard_Transient) obj = ent;
- TP.Transfer (obj);
+ TP.Transfer (obj, theProgress);
+ if (theProgress.UserBreak())
+ return res;
myTP->SetRoot (obj);
// Resultat ...
//=======================================================================
Standard_Integer XSControl_TransferReader::TransferList
- (const Handle(TColStd_HSequenceOfTransient)& list, const Standard_Boolean rec)
+ (const Handle(TColStd_HSequenceOfTransient)& list,
+ const Standard_Boolean rec,
+ const Message_ProgressRange& theProgress)
{
if (myActor.IsNull() || myModel.IsNull()) return 0;
Standard_Integer res = 0;
nb = list->Length();
Handle(Standard_Transient) obj;
-
- for (i = 1; i <= nb; i ++) {
+ Message_ProgressScope aPS(theProgress, NULL, nb);
+ for (i = 1; i <= nb && aPS.More(); i++) {
obj = list->Value(i);
- TP.Transfer (obj);
+ TP.Transfer (obj, aPS.Next());
myTP->SetRoot (obj);
// Resultat ...
//purpose :
//=======================================================================
-Standard_Integer XSControl_TransferReader::TransferRoots(const Interface_Graph& G)
+Standard_Integer XSControl_TransferReader::TransferRoots(const Interface_Graph& G,
+ const Message_ProgressRange& theProgress)
{
if (myModel != G.Model()) return -1;
if (!BeginTransfer()) return -1;
sout<<"\n*******************************************************************\n";
}
- TP.TransferRoots (G);
+ TP.TransferRoots (G, theProgress);
+ if (theProgress.UserBreak())
+ return -1;
// Les entites transferees sont notees "asmain"
Standard_Integer i,n = myTP->NbMapped();