0031595: Foundation Classes - make methods Message_Report::SendMessages() virtual
authorabv <abv@opencascade.com>
Thu, 17 Sep 2020 05:45:51 +0000 (08:45 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 18 Sep 2020 14:47:00 +0000 (17:47 +0300)
src/Message/Message_Report.cxx
src/Message/Message_Report.hxx

index 0732459..ce3708c 100644 (file)
@@ -189,7 +189,7 @@ void Message_Report::Dump (Standard_OStream& theOS, Message_Gravity theGravity)
 }
 
 //=======================================================================
-//function : Dump
+//function : SendMessages
 //purpose  :
 //=======================================================================
 
@@ -202,7 +202,7 @@ void Message_Report::SendMessages (const Handle(Message_Messenger)& theMessenger
 }
 
 //=======================================================================
-//function : Dump
+//function : SendMessages
 //purpose  :
 //=======================================================================
 
index 8440ba8..beddf14 100644 (file)
@@ -82,11 +82,14 @@ public:
   //! Dumps collected alerts with specified gravity to stream
   Standard_EXPORT void Dump (Standard_OStream& theOS, Message_Gravity theGravity);
 
-  //! Sends all collected alerts to messenger
-  Standard_EXPORT void SendMessages (const Handle(Message_Messenger)& theMessenger);
-
-  //! Dumps collected alerts with specified gravity to messenger
-  Standard_EXPORT void SendMessages (const Handle(Message_Messenger)& theMessenger, Message_Gravity theGravity);
+  //! Sends all collected alerts to messenger.
+  Standard_EXPORT virtual void SendMessages (const Handle(Message_Messenger)& theMessenger);
+
+  //! Dumps collected alerts with specified gravity to messenger.
+  //! Default implementation creates Message_Msg object with a message
+  //! key returned by alert, and sends it in the messenger.
+  Standard_EXPORT virtual void SendMessages (const Handle(Message_Messenger)& theMessenger, 
+                                             Message_Gravity theGravity);
 
   //! Merges data from theOther report into this
   Standard_EXPORT void Merge (const Handle(Message_Report)& theOther);