Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Data Structures
Message_Algorithm.hxx File Reference
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_Message_Algorithm.hxx>
#include <Message_ExecStatus.hxx>
#include <Handle_Message_Messenger.hxx>
#include <Handle_TColStd_HArray1OfTransient.hxx>
#include <MMgt_TShared.hxx>
#include <Message_Status.hxx>
#include <Standard_Integer.hxx>
#include <Standard_CString.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_TCollection_HAsciiString.hxx>
#include <Handle_TCollection_HExtendedString.hxx>
#include <Message_Gravity.hxx>
#include <Handle_TColStd_HPackedMapOfInteger.hxx>
#include <Handle_TColStd_HSequenceOfHExtendedString.hxx>
#include <Message_Algorithm.lxx>

Data Structures

class  Message_Algorithm
 Class Message_Algorithm is intended to be the base class for
classes implementing algorithms or any operations that need
to provide extended information on its execution to the
caller / user.

It provides generic mechanism for management of the execution
status, collection and output of messages.

The algorithm uses methods SetStatus() to set an execution status.
It is possible to associate a status with a number or a string
(second argument of SetStatus() methods) to indicate precisely
the item (object, element etc.) in the input data which caused
the problem.

Each execution status generated by the algorithm has associated
text message that should be defined in the resouce file loaded
with call to Message_MsgFile::LoadFile().

The messages corresponding to the statuses generated during the
algorithm execution are output to Message_Messenger using
methods SendMessages(). If status have associated numbers
or strings, they are included in the message body in place of
"%s" placeholder which should be present in the message text.

The name of the message text in the resource file is constructed
from name of the class and name of the status, separated by dot,
for instance:

.TObj_CheckModel.Alarm2
Error: Some objects (s) have references to dead object(s)

If message for the status is not found with prefix of
the current class type, the same message is searched for the base
class(es) recursively.

The messages are output to the messenger, stored in the field;
though messenger can be changed, it is guaranteed to be non-null.
By default, Message::DefaultMessenger() is used.
More...