0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / XmlMFunction / XmlMFunction_FunctionDriver.cxx
index 6903dd6..24c6eed 100644 (file)
@@ -14,7 +14,7 @@
 // commercial license or contractual agreement.
 
 
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Tool.hxx>
@@ -23,6 +23,7 @@
 #include <XmlObjMgt.hxx>
 #include <XmlObjMgt_Persistent.hxx>
 
+IMPLEMENT_STANDARD_RTTIEXT(XmlMFunction_FunctionDriver,XmlMDF_ADriver)
 IMPLEMENT_DOMSTRING (GuidString, "guid")
 IMPLEMENT_DOMSTRING (FailureString, "failure")
 
@@ -31,7 +32,7 @@ IMPLEMENT_DOMSTRING (FailureString, "failure")
 //purpose  : Constructor
 //=======================================================================
 XmlMFunction_FunctionDriver::XmlMFunction_FunctionDriver
-                        (const Handle(CDM_MessageDriver)& theMsgDriver)
+                        (const Handle(Message_Messenger)& theMsgDriver)
       : XmlMDF_ADriver (theMsgDriver, NULL)
 {}
 
@@ -61,7 +62,7 @@ Standard_Boolean XmlMFunction_FunctionDriver::Paste
   Standard_CString aGuidStr = (Standard_CString)aGuidDomStr.GetString();
   if (aGuidStr[0] == '\0')
   {
-    WriteMessage ("error retrieving GUID for type TFunction_Function");
+    myMessageDriver->Send ("error retrieving GUID for type TFunction_Function", Message_Fail);
     return Standard_False;
   }
   aF->SetDriverGUID(aGuidStr);
@@ -75,7 +76,7 @@ Standard_Boolean XmlMFunction_FunctionDriver::Paste
       TCollection_ExtendedString
         ("Cannot retrieve failure number for TFunction_Function attribute from \"")
           + aFStr + "\"";
-    WriteMessage (aMessageString);
+    myMessageDriver->Send (aMessageString, Message_Fail);
     return Standard_False;
   }
   aF->SetFailure(aValue);