1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0029220: Application Framework - replace CDM_MessageDriver interface by Message_Messenger.

This commit is contained in:
szy
2017-12-13 15:27:50 +03:00
committed by bugmaster
parent 31e026ba63
commit 83ae35919c
398 changed files with 1452 additions and 1824 deletions

View File

@@ -25,7 +25,7 @@
#include <BinMDocStd.hxx>
#include <BinMFunction.hxx>
#include <BinMNaming.hxx>
#include <CDM_MessageDriver.hxx>
#include <Message_Messenger.hxx>
#include <Plugin_Macro.hxx>
#include <Standard_Failure.hxx>
#include <Standard_GUID.hxx>
@@ -82,7 +82,7 @@ void BinDrivers::DefineFormat (const Handle(TDocStd_Application)& theApp)
//=======================================================================
Handle(BinMDF_ADriverTable) BinDrivers::AttributeDrivers
(const Handle(CDM_MessageDriver)& aMsgDrv)
(const Handle(Message_Messenger)& aMsgDrv)
{
Handle(BinMDF_ADriverTable) aTable = new BinMDF_ADriverTable;

View File

@@ -21,7 +21,7 @@
class Standard_Transient;
class Standard_GUID;
class BinMDF_ADriverTable;
class CDM_MessageDriver;
class Message_Messenger;
class TCollection_AsciiString;
class BinDrivers_DocumentStorageDriver;
class BinDrivers_DocumentRetrievalDriver;
@@ -37,7 +37,7 @@ public:
Standard_EXPORT static void DefineFormat (const Handle(TDocStd_Application)& theApp);
//! Creates the table of drivers of types supported
Standard_EXPORT static Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& MsgDrv);
Standard_EXPORT static Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& MsgDrv);
//! returns "1"
Standard_EXPORT static TCollection_AsciiString StorageVersion();

View File

@@ -21,7 +21,7 @@
#include <BinMDF_ADriverTable.hxx>
#include <BinMNaming.hxx>
#include <BinMNaming_NamedShapeDriver.hxx>
#include <CDM_MessageDriver.hxx>
#include <Message_Messenger.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Standard_IStream.hxx>
@@ -45,7 +45,7 @@ BinDrivers_DocumentRetrievalDriver::BinDrivers_DocumentRetrievalDriver ()
//=======================================================================
Handle(BinMDF_ADriverTable) BinDrivers_DocumentRetrievalDriver::AttributeDrivers
(const Handle(CDM_MessageDriver)& theMessageDriver)
(const Handle(Message_Messenger)& theMessageDriver)
{
return BinDrivers::AttributeDrivers (theMessageDriver);
}
@@ -58,7 +58,7 @@ Handle(BinMDF_ADriverTable) BinDrivers_DocumentRetrievalDriver::AttributeDrivers
void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
(BinLDrivers_DocumentSection& /*theSection*/,
Standard_IStream& theIS,
const Standard_Boolean /*isMess*/)
const Standard_Boolean /*isMess*/)
{
// Read Shapes
@@ -74,8 +74,8 @@ void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
catch(Standard_Failure const& anException) {
const TCollection_ExtendedString aMethStr
("BinDrivers_DocumentRetrievalDriver: ");
WriteMessage (aMethStr + "error of Shape Section " +
anException.GetMessageString());
myMsgDriver ->Send(aMethStr + "error of Shape Section " +
anException.GetMessageString(), Message_Fail);
}
}
}
@@ -85,8 +85,8 @@ void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
//purpose :
//=======================================================================
void BinDrivers_DocumentRetrievalDriver::CheckShapeSection(
const Storage_Position& /*ShapeSectionPos*/,
Standard_IStream& /*IS*/)
const Storage_Position& /*ShapeSectionPos*/,
Standard_IStream& /*IS*/)
{}
//=======================================================================
@@ -111,7 +111,7 @@ void BinDrivers_DocumentRetrievalDriver::Clear()
//purpose :
//=======================================================================
void BinDrivers_DocumentRetrievalDriver::PropagateDocumentVersion(
const Standard_Integer theDocVersion )
const Standard_Integer theDocVersion )
{
BinMDataStd::SetDocumentVersion(theDocVersion);
BinMNaming::SetDocumentVersion(theDocVersion);

View File

@@ -25,7 +25,7 @@
#include <Storage_Position.hxx>
#include <Standard_Integer.hxx>
class BinMDF_ADriverTable;
class CDM_MessageDriver;
class Message_Messenger;
class BinLDrivers_DocumentSection;
@@ -42,7 +42,7 @@ public:
//! Constructor
Standard_EXPORT BinDrivers_DocumentRetrievalDriver();
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& 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;

View File

@@ -20,7 +20,7 @@
#include <BinMDF_ADriver.hxx>
#include <BinMDF_ADriverTable.hxx>
#include <BinMNaming_NamedShapeDriver.hxx>
#include <CDM_MessageDriver.hxx>
#include <Message_Messenger.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
@@ -43,7 +43,7 @@ BinDrivers_DocumentStorageDriver::BinDrivers_DocumentStorageDriver ()
//=======================================================================
Handle(BinMDF_ADriverTable) BinDrivers_DocumentStorageDriver::AttributeDrivers
(const Handle(CDM_MessageDriver)& theMessageDriver)
(const Handle(Message_Messenger)& theMessageDriver)
{
return BinDrivers::AttributeDrivers (theMessageDriver);
}
@@ -70,7 +70,7 @@ Standard_Boolean BinDrivers_DocumentStorageDriver::IsWithTriangles() const
//function : SetWithTriangles
//purpose :
//=======================================================================
void BinDrivers_DocumentStorageDriver::SetWithTriangles (const Handle(CDM_MessageDriver)& theMessageDriver,
void BinDrivers_DocumentStorageDriver::SetWithTriangles (const Handle(Message_Messenger)& theMessageDriver,
const Standard_Boolean theWithTriangulation)
{
if (myDrivers.IsNull())
@@ -113,10 +113,8 @@ void BinDrivers_DocumentStorageDriver::WriteShapeSection
aNamedShapeDriver->WriteShapeSection (theOS);
}
catch(Standard_Failure const& anException) {
TCollection_ExtendedString anErrorStr ("Error: ");
TCollection_ExtendedString aStr =
anErrorStr + "BinDrivers_DocumentStorageDriver, Shape Section :";
WriteMessage (aStr + anException.GetMessageString());
TCollection_ExtendedString anErrorStr ("BinDrivers_DocumentStorageDriver, Shape Section :");
myMsgDriver->Send (anErrorStr + anException.GetMessageString(), Message_Fail);
}
}

View File

@@ -18,11 +18,11 @@
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BinLDrivers_DocumentStorageDriver.hxx>
#include <Standard_OStream.hxx>
#include <BinLDrivers_DocumentStorageDriver.hxx>
class BinMDF_ADriverTable;
class CDM_MessageDriver;
class Message_Messenger;
class BinLDrivers_DocumentSection;
@@ -39,7 +39,7 @@ public:
//! Constructor
Standard_EXPORT BinDrivers_DocumentStorageDriver();
Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& 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;
@@ -48,7 +48,7 @@ public:
Standard_EXPORT Standard_Boolean IsWithTriangles() const;
//! Set if triangulation should be stored or not.
Standard_EXPORT void SetWithTriangles (const Handle(CDM_MessageDriver)& theMessageDriver,
Standard_EXPORT void SetWithTriangles (const Handle(Message_Messenger)& theMessageDriver,
const Standard_Boolean theWithTriangulation);
DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver,BinLDrivers_DocumentStorageDriver)