0025748: Parallel version of progress indicator
[occt.git] / src / CDF / CDF_Application.cxx
index cb9f02b..2de4267 100644 (file)
@@ -33,7 +33,6 @@
 #include <Standard_NoSuchObject.hxx>
 #include <Standard_ProgramError.hxx>
 #include <UTL.hxx>
-#include <Message_ProgressSentry.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(CDF_Application,CDM_Application)
 //=======================================================================
@@ -88,10 +87,10 @@ void CDF_Application::Close(const Handle(CDM_Document)& aDocument) {
 Handle(CDM_Document) CDF_Application::Retrieve (const TCollection_ExtendedString& aFolder, 
                                                 const TCollection_ExtendedString& aName,
                                                 const Standard_Boolean UseStorageConfiguration,
-                                                const Handle(Message_ProgressIndicator)& theProgress)
+                                                const Message_ProgressRange& theRange)
 {
   TCollection_ExtendedString nullVersion;
-  return Retrieve(aFolder, aName, nullVersion, UseStorageConfiguration, theProgress);
+  return Retrieve(aFolder, aName, nullVersion, UseStorageConfiguration, theRange);
 }
 
 //=======================================================================
@@ -102,7 +101,7 @@ Handle(CDM_Document)  CDF_Application::Retrieve (const TCollection_ExtendedStrin
                                                 const TCollection_ExtendedString& aName,
                                                 const TCollection_ExtendedString& aVersion,
                                                 const Standard_Boolean UseStorageConfiguration,
-                                                const Handle(Message_ProgressIndicator)& theProgress)
+                                                const Message_ProgressRange& theRange)
 {
   Handle(CDM_MetaData) theMetaData; 
   
@@ -113,7 +112,7 @@ Handle(CDM_Document)  CDF_Application::Retrieve (const TCollection_ExtendedStrin
 
   CDF_TypeOfActivation theTypeOfActivation=TypeOfActivation(theMetaData);
   Handle(CDM_Document) theDocument = Retrieve(theMetaData, UseStorageConfiguration,
-                                              Standard_False, theProgress);
+                                              Standard_False, theRange);
 
   myDirectory->Add(theDocument);
   Activate(theDocument,theTypeOfActivation);
@@ -211,8 +210,8 @@ Standard_Boolean CDF_Application::SetDefaultFolder(const Standard_ExtString aFol
 //=======================================================================
 Handle(CDM_Document) CDF_Application::Retrieve(const Handle(CDM_MetaData)& aMetaData,
                                                const Standard_Boolean UseStorageConfiguration, 
-                                               const Handle(Message_ProgressIndicator)& theProgress) {
-  return Retrieve(aMetaData, UseStorageConfiguration, Standard_True, theProgress);
+                                               const Message_ProgressRange& theRange) {
+  return Retrieve(aMetaData, UseStorageConfiguration, Standard_True, theRange);
 } 
 
 //=======================================================================
@@ -222,7 +221,7 @@ Handle(CDM_Document) CDF_Application::Retrieve(const Handle(CDM_MetaData)& aMeta
 Handle(CDM_Document) CDF_Application::Retrieve (const Handle(CDM_MetaData)& aMetaData, 
                                                 const Standard_Boolean UseStorageConfiguration, 
                                                 const Standard_Boolean IsComponent, 
-                                                const Handle(Message_ProgressIndicator)& theProgress) {
+                                                const Message_ProgressRange& theRange) {
   
   Handle(CDM_Document) theDocumentToReturn;
   myRetrievableStatus = PCDM_RS_DriverFailure;
@@ -275,7 +274,7 @@ Handle(CDM_Document) CDF_Application::Retrieve (const Handle(CDM_MetaData)& aMet
 
     try {    
       OCC_CATCH_SIGNALS
-      theReader->Read (aMetaData->FileName(), theDocument, this, theProgress);
+      theReader->Read (aMetaData->FileName(), theDocument, this, theRange);
     } 
     catch (Standard_Failure const& anException) {
       myRetrievableStatus = theReader->GetStatus();
@@ -331,7 +330,7 @@ CDF_TypeOfActivation CDF_Application::TypeOfActivation(const Handle(CDM_MetaData
 //purpose  : 
 //=======================================================================
 Handle(CDM_Document) CDF_Application::Read (Standard_IStream& theIStream,
-                                            const Handle(Message_ProgressIndicator)& theProgress)
+                                            const Message_ProgressRange& theRange)
 {
   Handle(CDM_Document) aDoc;
   Handle(Storage_Data) dData;
@@ -369,7 +368,7 @@ Handle(CDM_Document) CDF_Application::Read (Standard_IStream& theIStream,
   try
   {
     OCC_CATCH_SIGNALS
-    aReader->Read (theIStream, dData, aDoc, this, theProgress);
+    aReader->Read (theIStream, dData, aDoc, this, theRange);
   }
   catch (Standard_Failure const& anException)
   {