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

#include <CountingMessageHandler.h>

The CountingMessageHandler class count the messages by types. More...

Inheritance diagram for sofa::helper::logging::countingmessagehandler::CountingMessageHandler:

Detailed Description

The CountingMessageHandler class count the messages by types.

This class is a MessageHandler that can be added to in a MessageDispatcher. Once set the class will start counting the messages passing through the MessageDispatcher according to their each Message::Type.

It is possible to query the number of a specific Message::Type using the getMessageCountFor function.

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

See also
MainCountingMessageHandler.

Public Member Functions

 CountingMessageHandler ()
 
 ~CountingMessageHandler () override
 
void reset ()
 
int getMessageCountFor (const Message::Type &type) 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::countingmessagehandler::CountingMessageHandler::CountingMessageHandler ( )
sofa::helper::logging::countingmessagehandler::CountingMessageHandler::~CountingMessageHandler ( )
inlineoverride

Function details

int sofa::helper::logging::countingmessagehandler::CountingMessageHandler::getMessageCountFor ( const Message::Type type) const
void sofa::helper::logging::countingmessagehandler::CountingMessageHandler::process ( Message m)
overridevirtual
void sofa::helper::logging::countingmessagehandler::CountingMessageHandler::reset ( void  )