mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0031353: TDocStd_Application does not have api to set progress indicator
Add support of Message_ProgressIndicator in BinTools classes. Add support of Message_ProgressIndicator with possibility of user break in methods of opening and saving TDocStd_Application. Add tests of ProgressIndicator in TDocStd_Applacation.
This commit is contained in:
@@ -58,7 +58,8 @@ Handle(BinMDF_ADriverTable) BinDrivers_DocumentRetrievalDriver::AttributeDrivers
|
||||
void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
|
||||
(BinLDrivers_DocumentSection& /*theSection*/,
|
||||
Standard_IStream& theIS,
|
||||
const Standard_Boolean /*isMess*/)
|
||||
const Standard_Boolean /*isMess*/,
|
||||
const Handle(Message_ProgressIndicator)& theProgress)
|
||||
|
||||
{
|
||||
// Read Shapes
|
||||
@@ -69,7 +70,7 @@ void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
|
||||
OCC_CATCH_SIGNALS
|
||||
Handle(BinMNaming_NamedShapeDriver) aNamedShapeDriver =
|
||||
Handle(BinMNaming_NamedShapeDriver)::DownCast (aDriver);
|
||||
aNamedShapeDriver->ReadShapeSection (theIS);
|
||||
aNamedShapeDriver->ReadShapeSection (theIS, theProgress);
|
||||
}
|
||||
catch(Standard_Failure const& anException) {
|
||||
const TCollection_ExtendedString aMethStr
|
||||
|
@@ -42,11 +42,17 @@ public:
|
||||
//! Constructor
|
||||
Standard_EXPORT BinDrivers_DocumentRetrievalDriver();
|
||||
|
||||
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers
|
||||
(const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void ReadShapeSection (BinLDrivers_DocumentSection& theSection, Standard_IStream& theIS, const Standard_Boolean isMess = Standard_False) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void ReadShapeSection
|
||||
(BinLDrivers_DocumentSection& theSection,
|
||||
Standard_IStream& theIS,
|
||||
const Standard_Boolean isMess = Standard_False,
|
||||
const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void CheckShapeSection (const Storage_Position& thePos, Standard_IStream& theIS) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void CheckShapeSection
|
||||
(const Storage_Position& thePos, Standard_IStream& theIS) Standard_OVERRIDE;
|
||||
|
||||
//! Clears the NamedShape driver
|
||||
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
|
||||
@@ -54,22 +60,6 @@ public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentRetrievalDriver,BinLDrivers_DocumentRetrievalDriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BinDrivers_DocumentRetrievalDriver_HeaderFile
|
||||
|
@@ -99,7 +99,8 @@ void BinDrivers_DocumentStorageDriver::SetWithTriangles (const Handle(Message_Me
|
||||
//=======================================================================
|
||||
void BinDrivers_DocumentStorageDriver::WriteShapeSection
|
||||
(BinLDrivers_DocumentSection& theSection,
|
||||
Standard_OStream& theOS)
|
||||
Standard_OStream& theOS,
|
||||
const Handle(Message_ProgressIndicator)& theProgress)
|
||||
{
|
||||
const Standard_Size aShapesSectionOffset = (Standard_Size) theOS.tellp();
|
||||
|
||||
@@ -110,7 +111,7 @@ void BinDrivers_DocumentStorageDriver::WriteShapeSection
|
||||
OCC_CATCH_SIGNALS
|
||||
Handle(BinMNaming_NamedShapeDriver) aNamedShapeDriver =
|
||||
Handle(BinMNaming_NamedShapeDriver)::DownCast (aDriver);
|
||||
aNamedShapeDriver->WriteShapeSection (theOS);
|
||||
aNamedShapeDriver->WriteShapeSection (theOS, theProgress);
|
||||
}
|
||||
catch(Standard_Failure const& anException) {
|
||||
TCollection_ExtendedString anErrorStr ("BinDrivers_DocumentStorageDriver, Shape Section :");
|
||||
|
@@ -39,10 +39,14 @@ public:
|
||||
//! Constructor
|
||||
Standard_EXPORT BinDrivers_DocumentStorageDriver();
|
||||
|
||||
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers
|
||||
(const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
|
||||
//! implements the procedure of writing a shape section to file
|
||||
Standard_EXPORT virtual void WriteShapeSection (BinLDrivers_DocumentSection& theDocSection, Standard_OStream& theOS) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void WriteShapeSection
|
||||
(BinLDrivers_DocumentSection& theDocSection,
|
||||
Standard_OStream& theOS,
|
||||
const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
|
||||
|
||||
//! Return true if shape should be stored with triangles.
|
||||
Standard_EXPORT Standard_Boolean IsWithTriangles() const;
|
||||
@@ -53,22 +57,6 @@ public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver,BinLDrivers_DocumentStorageDriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BinDrivers_DocumentStorageDriver_HeaderFile
|
||||
|
Reference in New Issue
Block a user