OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Message Class Reference

    Defines. More...

    #include <Message.hxx>

    Static Public Member Functions

    static const occ::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 int Hour, const int Minute, const double Second)
     Returns the string filled with values of hours, minutes and seconds. Example:
    static const occ::handle< Message_Report > & DefaultReport (const bool theToCreate=false)
     returns the only one instance of Report When theToCreate is true - automatically creates message report when not exist.
    static bool MetricFromString (const char *const theString, Message_MetricType &theType)
     Determines the metric from the given string identifier.
    static const char * MetricToString (const Message_MetricType theType)
     Returns the string name for a given metric type.
    static Message_MetricType MetricFromString (const char *const theString)
     Returns the metric type from the given string identifier.
    static bool ToOSDMetric (const Message_MetricType theMetric, OSD_MemInfo::Counter &theMemInfo)
     Converts message metric to OSD memory info type.
    static bool ToMessageMetric (const OSD_MemInfo::Counter theMemInfo, Message_MetricType &theMetric)
     Converts OSD memory info type to message metric.

    Detailed Description

    Defines.

    • tools to work with messages
    • basic tools intended for progress indication

    Member Function Documentation

    ◆ DefaultMessenger()

    const occ::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 Message_Messenger::StreamBuffer SendWarning()
    Returns the string filled with values of hours, minutes and seconds. Example:
    Definition Message.hxx:69
    static const occ::handle< Message_Messenger > & DefaultMessenger()
    Defines default messenger for OCCT applications. This is global static instance of the messenger....
    static Message_Messenger::StreamBuffer SendFail()
    Returns the string filled with values of hours, minutes and seconds. Example:
    Definition Message.hxx:65

    ◆ DefaultReport()

    const occ::handle< Message_Report > & Message::DefaultReport ( const bool theToCreate = false)
    static

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

    ◆ FillTime()

    TCollection_AsciiString Message::FillTime ( const int Hour,
    const int Minute,
    const double 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]

    Message_MetricType Message::MetricFromString ( const char *const 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]

    bool Message::MetricFromString ( const char *const 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()

    const char * 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]

    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]

    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]

    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]

    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]

    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]

    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]

    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]

    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]

    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]

    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]

    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]

    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()

    bool 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
    [out]theMetricfilled message metric
    Returns
    true if converted

    ◆ ToOSDMetric()

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

    Converts message metric to OSD memory info type.

    Parameters
    [in]theMetricmessage metric
    [out]theMemInfofilled memory info type
    Returns
    true if converted

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