yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::core::AsyncMessageDispatcher Class Reference

#include <message.h>

Inheritance diagram for yaze::app::core::AsyncMessageDispatcher:
Collaboration diagram for yaze::app::core::AsyncMessageDispatcher:

Public Member Functions

void Start ()
 
void Stop ()
 
void EnqueueMessage (const Message &message)
 
- Public Member Functions inherited from yaze::app::core::MessageDispatcher
void RegisterListener (const std::string &message_type, IMessageListener *listener)
 
void UnregisterListener (const std::string &message_type, IMessageListener *listener)
 
void RegisterProtocol (IMessageProtocol *protocol)
 
void RegisterFilteredListener (const std::string &message_type, IMessageListener *listener, std::unique_ptr< MessageFilter > filter)
 
void BindHandler (const std::string &message_type, MessageHandler handler)
 
void SendMessage (const Message &message)
 
void DispatchMessage (const Message &message)
 

Private Member Functions

void DispatchLoop ()
 

Private Attributes

std::queue< MessagemessageQueue_
 
std::mutex queueMutex_
 
std::thread dispatchThread_
 
bool running_ = false
 

Detailed Description

Definition at line 75 of file message.h.

Member Function Documentation

◆ Start()

void yaze::app::core::AsyncMessageDispatcher::Start ( )

Definition at line 71 of file message.cc.

◆ Stop()

void yaze::app::core::AsyncMessageDispatcher::Stop ( )

Definition at line 76 of file message.cc.

◆ EnqueueMessage()

void yaze::app::core::AsyncMessageDispatcher::EnqueueMessage ( const Message & message)

Definition at line 80 of file message.cc.

◆ DispatchLoop()

void yaze::app::core::AsyncMessageDispatcher::DispatchLoop ( )
private

Definition at line 84 of file message.cc.

Member Data Documentation

◆ messageQueue_

std::queue<Message> yaze::app::core::AsyncMessageDispatcher::messageQueue_
private

Definition at line 83 of file message.h.

◆ queueMutex_

std::mutex yaze::app::core::AsyncMessageDispatcher::queueMutex_
private

Definition at line 84 of file message.h.

◆ dispatchThread_

std::thread yaze::app::core::AsyncMessageDispatcher::dispatchThread_
private

Definition at line 85 of file message.h.

◆ running_

bool yaze::app::core::AsyncMessageDispatcher::running_ = false
private

Definition at line 86 of file message.h.


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