Chatsync  bbffde5c0c672a526bdc83637acf66dc20a80fbf
messaging::Message Class Referenceabstract

#include <message.hpp>

Inheritance diagram for messaging::Message:
messaging::ActionMessage messaging::TextMessage

Public Member Functions

 Message (const uint16_t id)
 
virtual MessageType type () const =0
 

Data Fields

const uint16_t _originId
 

Detailed Description

Base class for all messages, needed for general architecture planning

Lifecycle:

  1. message_ptr is created inside an input channel and std::move()'d into hub
  2. Hub creates message_ptr copies and sends them to each output channel asyncronously
  3. After every output sends data to receiver Message dies with last message_ptr

Constructor & Destructor Documentation

§ Message()

messaging::Message::Message ( const uint16_t  id)
inline

Member Function Documentation

§ type()

virtual MessageType messaging::Message::type ( ) const
pure virtual

Created to avoid typeid() calls

Implemented in messaging::ActionMessage, and messaging::TextMessage.

Field Documentation

§ _originId

const uint16_t messaging::Message::_originId

Id of channel produced the message


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