cc_tools_qt
Common Environment for Protocol Analysis.
|
#include "cc_tools_qt/MessageHandler.h"
Generic message handler used by CommsChampion Tools.
Provides polymorphic behavior via its protected functions, which can be overriden in the derived class.
Public Types | |
using | FieldWrapperPtr = field_wrapper::FieldWrapperPtr |
Pinter to field_wrapper::FieldWrapper object. | |
Public Member Functions | |
virtual | ~MessageHandler () noexcept |
Destructor. | |
template<typename TMessage > | |
void | handle (TMessage &msg) |
Handle the message. | |
Protected Member Functions | |
virtual void | addExtraTransportFieldImpl (FieldWrapperPtr wrapper) |
Polymorphic request to add handling of the extra transport field. | |
virtual void | addFieldImpl (FieldWrapperPtr wrapper) |
Polymorphic request to add handling of the message field. | |
virtual void | beginMsgHandlingImpl (Message &msg) |
Polymorphic report about starting message handling. | |
virtual void | endMsgHandlingImpl () |
Polymorphic report about ending message handling. | |
|
protectedvirtual |
Polymorphic request to add handling of the extra transport field.
[in] | wrapper | Pointer to field wrapper. |
|
protectedvirtual |
Polymorphic request to add handling of the message field.
[in] | wrapper | Pointer to field wrapper. |
|
protectedvirtual |
Polymorphic report about starting message handling.
[in] | msg | Reference to message object. |
void cc_tools_qt::MessageHandler::handle | ( | TMessage & | msg | ) |
Handle the message.
The function invokes virtual beginMsgHandlingImpl() at the begining of handling, then for every field the message contains, the addFieldImpl() virtuam member function is invoked. At the end the endMsgHandlingImpl() virtual member function is invoked.
TMessage | Message type |
[in] | msg | Reference to message object |