#include <CountingMessageHandler.h>
The CountingMessageHandler class count the messages by types. More...
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
Public Member Functions | |
CountingMessageHandler () | |
~CountingMessageHandler () override | |
void | reset () |
int | getMessageCountFor (const Message::Type &type) const |
void | process (Message &m) override |
Inherited from MessageHandler. More... | |
sofa::helper::logging::countingmessagehandler::CountingMessageHandler::CountingMessageHandler | ( | ) |
|
inlineoverride |
int sofa::helper::logging::countingmessagehandler::CountingMessageHandler::getMessageCountFor | ( | const Message::Type & | type | ) | const |
|
overridevirtual |
Inherited from MessageHandler.
Implements sofa::helper::logging::MessageHandler.
void sofa::helper::logging::countingmessagehandler::CountingMessageHandler::reset | ( | void | ) |