mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -50,7 +50,8 @@ Handle(XmlMDF_ADriverTable) XmlDrivers_DocumentRetrievalDriver::AttributeDrivers
|
||||
//=======================================================================
|
||||
Handle(XmlMDF_ADriver) XmlDrivers_DocumentRetrievalDriver::ReadShapeSection(
|
||||
const XmlObjMgt_Element& theElement,
|
||||
const Handle(Message_Messenger)& theMsgDriver)
|
||||
const Handle(Message_Messenger)& theMsgDriver,
|
||||
const Handle(Message_ProgressIndicator)& theProgress)
|
||||
{
|
||||
if (myDrivers.IsNull()) myDrivers = AttributeDrivers (theMsgDriver);
|
||||
Handle(XmlMDF_ADriver) aDriver;
|
||||
@@ -58,7 +59,7 @@ Handle(XmlMDF_ADriver) XmlDrivers_DocumentRetrievalDriver::ReadShapeSection(
|
||||
{
|
||||
Handle(XmlMNaming_NamedShapeDriver) aNamedShapeDriver =
|
||||
Handle(XmlMNaming_NamedShapeDriver)::DownCast (aDriver);
|
||||
aNamedShapeDriver -> ReadShapeSection (theElement);
|
||||
aNamedShapeDriver->ReadShapeSection (theElement, theProgress);
|
||||
}
|
||||
return aDriver;
|
||||
}
|
||||
|
@@ -33,38 +33,23 @@ DEFINE_STANDARD_HANDLE(XmlDrivers_DocumentRetrievalDriver, XmlLDrivers_DocumentR
|
||||
|
||||
class XmlDrivers_DocumentRetrievalDriver : public XmlLDrivers_DocumentRetrievalDriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlDrivers_DocumentRetrievalDriver();
|
||||
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers
|
||||
(const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriver) ReadShapeSection (const XmlObjMgt_Element& thePDoc, const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriver) ReadShapeSection
|
||||
(const XmlObjMgt_Element& thePDoc,
|
||||
const Handle(Message_Messenger)& theMsgDriver,
|
||||
const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void ShapeSetCleaning (const Handle(XmlMDF_ADriver)& theDriver) Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_EXPORT virtual void ShapeSetCleaning
|
||||
(const Handle(XmlMDF_ADriver)& theDriver) Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XmlDrivers_DocumentRetrievalDriver,XmlLDrivers_DocumentRetrievalDriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlDrivers_DocumentRetrievalDriver_HeaderFile
|
||||
|
@@ -51,7 +51,8 @@ Handle(XmlMDF_ADriverTable) XmlDrivers_DocumentStorageDriver::AttributeDrivers
|
||||
//purpose : Implements WriteShapeSection
|
||||
//=======================================================================
|
||||
Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
|
||||
(XmlObjMgt_Element& theElement)
|
||||
(XmlObjMgt_Element& theElement,
|
||||
const Handle(Message_ProgressIndicator)& theProgress)
|
||||
{
|
||||
Standard_Boolean isShape(Standard_False);
|
||||
Handle(XmlMDF_ADriver) aDriver;
|
||||
@@ -59,7 +60,7 @@ Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
|
||||
{
|
||||
Handle(XmlMNaming_NamedShapeDriver) aNamedShapeDriver =
|
||||
Handle(XmlMNaming_NamedShapeDriver)::DownCast (aDriver);
|
||||
aNamedShapeDriver -> WriteShapeSection (theElement);
|
||||
aNamedShapeDriver->WriteShapeSection (theElement, theProgress);
|
||||
isShape = Standard_True;
|
||||
}
|
||||
return isShape;
|
||||
|
@@ -33,37 +33,20 @@ DEFINE_STANDARD_HANDLE(XmlDrivers_DocumentStorageDriver, XmlLDrivers_DocumentSto
|
||||
|
||||
class XmlDrivers_DocumentStorageDriver : public XmlLDrivers_DocumentStorageDriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
Standard_EXPORT XmlDrivers_DocumentStorageDriver
|
||||
(const TCollection_ExtendedString& theCopyright);
|
||||
|
||||
Standard_EXPORT XmlDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers
|
||||
(const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean WriteShapeSection (XmlObjMgt_Element& thePDoc) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean WriteShapeSection
|
||||
(XmlObjMgt_Element& thePDoc,
|
||||
const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XmlDrivers_DocumentStorageDriver,XmlLDrivers_DocumentStorageDriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlDrivers_DocumentStorageDriver_HeaderFile
|
||||
|
Reference in New Issue
Block a user