#include <Standard_Type.hxx>
#include <Message_Gravity.hxx>
-#include <MMgt_TShared.hxx>
+#include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
class TCollection_ExtendedString;
class Message_Printer;
-DEFINE_STANDARD_HANDLE(Message_Printer, MMgt_TShared)
+DEFINE_STANDARD_HANDLE(Message_Printer, Standard_Transient)
//! Abstract interface class defining printer as output context for text messages
//!
//! The message, besides being text string, has associated gravity
//! level, which can be used by printer to decide either to process a message or ignore it.
-class Message_Printer : public MMgt_TShared
+class Message_Printer : public Standard_Transient
{
-
+ DEFINE_STANDARD_RTTIEXT(Message_Printer, Standard_Transient)
public:
-
//! Return trace level used for filtering messages;
//! messages with lover gravity will be ignored.
- Message_Gravity GetTraceLevel() const;
-
+ Message_Gravity GetTraceLevel() const { return myTraceLevel; }
+
//! Set trace level used for filtering messages.
//! By default, trace level is Message_Info, so that all messages are output
- void SetTraceLevel (const Message_Gravity theTraceLevel);
-
+ void SetTraceLevel (const Message_Gravity theTraceLevel) { myTraceLevel = theTraceLevel; }
+
//! Send a string message with specified trace level.
- //! The parameter theToPutEol specified whether end-of-line should be added to the end of the message.
- //! This method must be redefined in descentant.
- Standard_EXPORT virtual void Send (const TCollection_ExtendedString& theString, const Message_Gravity theGravity, const Standard_Boolean theToPutEol) const = 0;
+ //! The last Boolean argument is deprecated and unused.
+ //! Default implementation redirects to send().
+ Standard_EXPORT virtual void Send (const TCollection_ExtendedString& theString,
+ const Message_Gravity theGravity) const;
//! Send a string message with specified trace level.
- //! The parameter theToPutEol specified whether end-of-line should be added to the end of the message.
- //! Default implementation calls first method Send().
- Standard_EXPORT virtual void Send (const Standard_CString theString, const Message_Gravity theGravity, const Standard_Boolean theToPutEol) const;
+ //! The last Boolean argument is deprecated and unused.
+ //! Default implementation redirects to send().
+ Standard_EXPORT virtual void Send (const Standard_CString theString,
+ const Message_Gravity theGravity) const;
//! Send a string message with specified trace level.
- //! The parameter theToPutEol specified whether end-of-line should be added to the end of the message.
- //! Default implementation calls first method Send().
- Standard_EXPORT virtual void Send (const TCollection_AsciiString& theString, const Message_Gravity theGravity, const Standard_Boolean theToPutEol) const;
-
-
-
-
- DEFINE_STANDARD_RTTI(Message_Printer,MMgt_TShared)
+ //! The last Boolean argument is deprecated and unused.
+ //! Default implementation redirects to send().
+ Standard_EXPORT virtual void Send (const TCollection_AsciiString& theString,
+ const Message_Gravity theGravity) const;
protected:
-
//! Empty constructor with Message_Info trace level
Standard_EXPORT Message_Printer();
- Message_Gravity myTraceLevel;
-
-
-private:
-
+ //! Send a string message with specified trace level.
+ //! This method must be redefined in descentant.
+ Standard_EXPORT virtual void send (const TCollection_AsciiString& theString,
+ const Message_Gravity theGravity) const = 0;
+protected:
+ Message_Gravity myTraceLevel;
};
-
-#include <Message_Printer.lxx>
-
-
-
-
-
#endif // _Message_Printer_HeaderFile