cc_tools_qt
Common Environment for Protocol Analysis.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
cc_tools_qt::MessageHandler Class Reference

#include "cc_tools_qt/MessageHandler.h"

Detailed Description

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.
 

Member Function Documentation

◆ addExtraTransportFieldImpl()

virtual void cc_tools_qt::MessageHandler::addExtraTransportFieldImpl ( FieldWrapperPtr  wrapper)
protectedvirtual

Polymorphic request to add handling of the extra transport field.

Parameters
[in]wrapperPointer to field wrapper.

◆ addFieldImpl()

virtual void cc_tools_qt::MessageHandler::addFieldImpl ( FieldWrapperPtr  wrapper)
protectedvirtual

Polymorphic request to add handling of the message field.

Parameters
[in]wrapperPointer to field wrapper.

◆ beginMsgHandlingImpl()

virtual void cc_tools_qt::MessageHandler::beginMsgHandlingImpl ( Message msg)
protectedvirtual

Polymorphic report about starting message handling.

Parameters
[in]msgReference to message object.

◆ handle()

template<typename TMessage >
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.

Template Parameters
TMessageMessage type
Parameters
[in]msgReference to message object

The documentation for this class was generated from the following file: