Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
Message_Msg Class Reference

This class provides a tool for constructing the parametrized message basing on resources loaded by Message_MsgFile tool. More...

#include <Message_Msg.hxx>

Public Member Functions

 Message_Msg ()
 Empty constructor.
 
 Message_Msg (const Message_Msg &theMsg)
 Copy constructor.
 
 Message_Msg (const char *const theKey)
 Create a message using a corresponding entry in Message_MsgFile.
 
 Message_Msg (const TCollection_ExtendedString &theKey)
 Create a message using a corresponding entry in Message_MsgFile.
 
void Set (const char *const theMsg)
 Set a message body text – can be used as alternative to using messages from resource file.
 
void Set (const TCollection_ExtendedString &theMsg)
 Set a message body text – can be used as alternative to using messages from resource file.
 
Message_MsgArg (const char *const theString)
 Set a value for %..s conversion.
 
Message_Msgoperator<< (const char *const theString)
 
Message_MsgArg (const TCollection_AsciiString &theString)
 Set a value for %..s conversion.
 
Message_Msgoperator<< (const TCollection_AsciiString &theString)
 
Message_MsgArg (const occ::handle< TCollection_HAsciiString > &theString)
 Set a value for %..s conversion.
 
Message_Msgoperator<< (const occ::handle< TCollection_HAsciiString > &theString)
 
Message_MsgArg (const TCollection_ExtendedString &theString)
 Set a value for %..s conversion.
 
Message_Msgoperator<< (const TCollection_ExtendedString &theString)
 
Message_MsgArg (const occ::handle< TCollection_HExtendedString > &theString)
 Set a value for %..s conversion.
 
Message_Msgoperator<< (const occ::handle< TCollection_HExtendedString > &theString)
 
Message_MsgArg (const int theInt)
 Set a value for %..d, %..i, %..o, %..u, %..x or %..X conversion.
 
Message_Msgoperator<< (const int theInt)
 
Message_MsgArg (const double theReal)
 Set a value for %..f, %..e, %..E, %..g or %..G conversion.
 
Message_Msgoperator<< (const double theReal)
 
const TCollection_ExtendedStringOriginal () const
 Returns the original message text.
 
const TCollection_ExtendedStringValue () const
 Returns current state of the message text with parameters to the moment.
 
bool IsEdited () const
 Tells if Value differs from Original.
 
const TCollection_ExtendedStringGet ()
 Return the resulting message string with all parameters filled. If some parameters were not yet filled by calls to methods Arg (or <<), these parameters are filled by the word UNKNOWN.
 
 operator const TCollection_ExtendedString & ()
 

Detailed Description

This class provides a tool for constructing the parametrized message basing on resources loaded by Message_MsgFile tool.

A Message is created from a keyword: this keyword identifies the message in a message file that should be previously loaded by call to Message_MsgFile::LoadFile().

The text of the message can contain placeholders for the parameters which are to be filled by the proper values when the message is prepared. Most of the format specifiers used in C can be used, for instance, s for string, d for integer etc. In addition, specifier f is supported for double numbers (for compatibility with previous versions).

User fills the parameter fields in the text of the message by calling corresponding methods Arg() or operators .

The resulting message, filled with all parameters, can be obtained by method Get(). If some parameters were not filled, the text UNKNOWN is placed instead.

Constructor & Destructor Documentation

◆ Message_Msg() [1/4]

Message_Msg::Message_Msg ( )

Empty constructor.

◆ Message_Msg() [2/4]

Message_Msg::Message_Msg ( const Message_Msg & theMsg)

Copy constructor.

◆ Message_Msg() [3/4]

Message_Msg::Message_Msg ( const char *const theKey)

Create a message using a corresponding entry in Message_MsgFile.

◆ Message_Msg() [4/4]

Message_Msg::Message_Msg ( const TCollection_ExtendedString & theKey)

Create a message using a corresponding entry in Message_MsgFile.

Member Function Documentation

◆ Arg() [1/7]

Message_Msg & Message_Msg::Arg ( const char *const theString)

Set a value for %..s conversion.

◆ Arg() [2/7]

Message_Msg & Message_Msg::Arg ( const double theReal)

Set a value for %..f, %..e, %..E, %..g or %..G conversion.

◆ Arg() [3/7]

Message_Msg & Message_Msg::Arg ( const int theInt)

Set a value for %..d, %..i, %..o, %..u, %..x or %..X conversion.

◆ Arg() [4/7]

Message_Msg & Message_Msg::Arg ( const occ::handle< TCollection_HAsciiString > & theString)

Set a value for %..s conversion.

◆ Arg() [5/7]

Message_Msg & Message_Msg::Arg ( const occ::handle< TCollection_HExtendedString > & theString)

Set a value for %..s conversion.

◆ Arg() [6/7]

Message_Msg & Message_Msg::Arg ( const TCollection_AsciiString & theString)

Set a value for %..s conversion.

◆ Arg() [7/7]

Message_Msg & Message_Msg::Arg ( const TCollection_ExtendedString & theString)

Set a value for %..s conversion.

◆ Get()

const TCollection_ExtendedString & Message_Msg::Get ( )

Return the resulting message string with all parameters filled. If some parameters were not yet filled by calls to methods Arg (or <<), these parameters are filled by the word UNKNOWN.

◆ IsEdited()

bool Message_Msg::IsEdited ( ) const

Tells if Value differs from Original.

◆ operator const TCollection_ExtendedString &()

Message_Msg::operator const TCollection_ExtendedString & ( )
inline

◆ operator<<() [1/7]

Message_Msg & Message_Msg::operator<< ( const char *const theString)
inline

◆ operator<<() [2/7]

Message_Msg & Message_Msg::operator<< ( const double theReal)
inline

◆ operator<<() [3/7]

Message_Msg & Message_Msg::operator<< ( const int theInt)
inline

◆ operator<<() [4/7]

Message_Msg & Message_Msg::operator<< ( const occ::handle< TCollection_HAsciiString > & theString)
inline

◆ operator<<() [5/7]

Message_Msg & Message_Msg::operator<< ( const occ::handle< TCollection_HExtendedString > & theString)
inline

◆ operator<<() [6/7]

Message_Msg & Message_Msg::operator<< ( const TCollection_AsciiString & theString)
inline

◆ operator<<() [7/7]

Message_Msg & Message_Msg::operator<< ( const TCollection_ExtendedString & theString)
inline

◆ Original()

const TCollection_ExtendedString & Message_Msg::Original ( ) const

Returns the original message text.

◆ Set() [1/2]

void Message_Msg::Set ( const char *const theMsg)

Set a message body text – can be used as alternative to using messages from resource file.

◆ Set() [2/2]

void Message_Msg::Set ( const TCollection_ExtendedString & theMsg)

Set a message body text – can be used as alternative to using messages from resource file.

◆ Value()

const TCollection_ExtendedString & Message_Msg::Value ( ) const

Returns current state of the message text with parameters to the moment.


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