Open CASCADE Technology 7.8.0
Static Public Member Functions
Message Class Reference

Defines. More...

#include <Message.hxx>

Static Public Member Functions

static const Handle< Message_Messenger > & DefaultMessenger ()
 Defines default messenger for OCCT applications. This is global static instance of the messenger. By default, it contains single printer directed to std::cout. It can be customized according to the application needs.
 
Short-cuts to DefaultMessenger
static Message_Messenger::StreamBuffer Send (Message_Gravity theGravity)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void Send (const TCollection_AsciiString &theMessage, Message_Gravity theGravity)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static Message_Messenger::StreamBuffer SendFail ()
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static Message_Messenger::StreamBuffer SendAlarm ()
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static Message_Messenger::StreamBuffer SendWarning ()
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static Message_Messenger::StreamBuffer SendInfo ()
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static Message_Messenger::StreamBuffer SendTrace ()
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void SendFail (const TCollection_AsciiString &theMessage)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void SendAlarm (const TCollection_AsciiString &theMessage)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void SendWarning (const TCollection_AsciiString &theMessage)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void SendInfo (const TCollection_AsciiString &theMessage)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static void SendTrace (const TCollection_AsciiString &theMessage)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static TCollection_AsciiString FillTime (const Standard_Integer Hour, const Standard_Integer Minute, const Standard_Real Second)
 Returns the string filled with values of hours, minutes and seconds. Example:
 
static const Handle< Message_Report > & DefaultReport (const Standard_Boolean theToCreate=Standard_False)
 returns the only one instance of Report When theToCreate is true - automatically creates message report when not exist.
 
static Standard_Boolean MetricFromString (const Standard_CString theString, Message_MetricType &theType)
 Determines the metric from the given string identifier.
 
static Standard_CString MetricToString (const Message_MetricType theType)
 Returns the string name for a given metric type.
 
static Message_MetricType MetricFromString (const Standard_CString theString)
 Returns the metric type from the given string identifier.
 
static Standard_Boolean ToOSDMetric (const Message_MetricType theMetric, OSD_MemInfo::Counter &theMemInfo)
 Converts message metric to OSD memory info type.
 
static Standard_Boolean ToMessageMetric (const OSD_MemInfo::Counter theMemInfo, Message_MetricType &theMetric)
 Converts OSD memory info type to message metric.
 

Detailed Description

Defines.

Member Function Documentation

◆ DefaultMessenger()

static const Handle< Message_Messenger > & Message::DefaultMessenger ( )
static

Defines default messenger for OCCT applications. This is global static instance of the messenger. By default, it contains single printer directed to std::cout. It can be customized according to the application needs.

The following syntax can be used to print messages:

Message::SendWarning ("My Warning"); // short-cut for Message_Warning
Message::SendWarning() << "My Warning with " << theCounter << " arguments";
Message::SendFail ("My Failure"); // short-cut for Message_Fail
@ Message_Warning
Definition Message_Gravity.hxx:30
static const Handle< Message_Messenger > & DefaultMessenger()
Defines default messenger for OCCT applications. This is global static instance of the messenger....
static Message_Messenger::StreamBuffer SendWarning()
Returns the string filled with values of hours, minutes and seconds. Example:
Definition Message.hxx:68
static Message_Messenger::StreamBuffer SendFail()
Returns the string filled with values of hours, minutes and seconds. Example:
Definition Message.hxx:66
Definition NCollection_UBTree.hxx:64

◆ DefaultReport()

static const Handle< Message_Report > & Message::DefaultReport ( const Standard_Boolean  theToCreate = Standard_False)
static

returns the only one instance of Report When theToCreate is true - automatically creates message report when not exist.

◆ FillTime()

static TCollection_AsciiString Message::FillTime ( const Standard_Integer  Hour,
const Standard_Integer  Minute,
const Standard_Real  Second 
)
static

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ MetricFromString() [1/2]

static Message_MetricType Message::MetricFromString ( const Standard_CString  theString)
inlinestatic

Returns the metric type from the given string identifier.

Parameters
theStringstring identifier
Returns
metric type or Message_MetricType_None if string identifier is invalid

◆ MetricFromString() [2/2]

static Standard_Boolean Message::MetricFromString ( const Standard_CString  theString,
Message_MetricType theType 
)
static

Determines the metric from the given string identifier.

Parameters
theStringstring identifier
theTypedetected type of metric
Returns
TRUE if string identifier is known

◆ MetricToString()

static Standard_CString Message::MetricToString ( const Message_MetricType  theType)
static

Returns the string name for a given metric type.

Parameters
theTypemetric type
Returns
string identifier from the list of Message_MetricType

◆ Send() [1/2]

static void Message::Send ( const TCollection_AsciiString theMessage,
Message_Gravity  theGravity 
)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ Send() [2/2]

static Message_Messenger::StreamBuffer Message::Send ( Message_Gravity  theGravity)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendAlarm() [1/2]

static Message_Messenger::StreamBuffer Message::SendAlarm ( )
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendAlarm() [2/2]

static void Message::SendAlarm ( const TCollection_AsciiString theMessage)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendFail() [1/2]

static Message_Messenger::StreamBuffer Message::SendFail ( )
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendFail() [2/2]

static void Message::SendFail ( const TCollection_AsciiString theMessage)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendInfo() [1/2]

static Message_Messenger::StreamBuffer Message::SendInfo ( )
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendInfo() [2/2]

static void Message::SendInfo ( const TCollection_AsciiString theMessage)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendTrace() [1/2]

static Message_Messenger::StreamBuffer Message::SendTrace ( )
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendTrace() [2/2]

static void Message::SendTrace ( const TCollection_AsciiString theMessage)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendWarning() [1/2]

static Message_Messenger::StreamBuffer Message::SendWarning ( )
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ SendWarning() [2/2]

static void Message::SendWarning ( const TCollection_AsciiString theMessage)
inlinestatic

Returns the string filled with values of hours, minutes and seconds. Example:

  1. (5, 12, 26.3345) returns "05h:12m:26.33s",
  2. (0, 6, 34.496 ) returns "06m:34.50s",
  3. (0, 0, 4.5 ) returns "4.50s"

◆ ToMessageMetric()

static Standard_Boolean Message::ToMessageMetric ( const OSD_MemInfo::Counter  theMemInfo,
Message_MetricType theMetric 
)
static

Converts OSD memory info type to message metric.

Parameters
theMemInfo[int] memory info type
theMetric[out] filled message metric
Returns
true if converted

◆ ToOSDMetric()

static Standard_Boolean Message::ToOSDMetric ( const Message_MetricType  theMetric,
OSD_MemInfo::Counter theMemInfo 
)
static

Converts message metric to OSD memory info type.

Parameters
theMetric[in] message metric
theMemInfo[out] filled memory info type
Returns
true if converted

The documentation for this class was generated from the following file: