SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler Class Reference

#include <LoggingMessageHandler.h>

The LoggingMessageHandler class saves a copy of the messages in a buffer. More...

Inheritance diagram for sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler:

Detailed Description

The LoggingMessageHandler class saves a copy of the messages in a buffer.

This class is a MessageHandler that can be added to in a MessageDispatcher. Once set the class can start copying the messages passing through the MessageDispatcher in a buffer.

Dedicated function allows to activate/deactive the saving of the messages as well as to clear the content of the buffer. The class keeps tracks of its number of activation/deactivation. Message logging is activated as long as there is not a paired number of activation/deactivation.

User interested in having a singleton of this class should have a look at

See also

You can also see the

See also
LogMessage for example of use

Public Member Functions

 LoggingMessageHandler ()
 ~LoggingMessageHandler () override
void reset ()
size_t activate ()
size_t deactivate ()
const vector< Message > & getMessages () const
void process (Message &m) override
 Inherited from MessageHandler. More...
- Public Member Functions inherited from sofa::helper::logging::MessageHandler
virtual ~MessageHandler ()

Constructor details

sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::LoggingMessageHandler ( )
sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::~LoggingMessageHandler ( )

Function details

size_t sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::activate ( )
size_t sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::deactivate ( )
const vector< Message > & sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::getMessages ( ) const
void sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::process ( Message m)
void sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::reset ( void  )