25 #ifndef __MESSENGER_H__
26 #define __MESSENGER_H__
63 std::deque<Message> messages;
66 std::map<std::string, Inbox> m_boxes;
88 void addInbox(
const char* name,
unsigned int id);
95 unsigned int getMessagesCount(
const char* name);
108 void sendMessage(
const char* message,
unsigned int messageId,
void* data,
const char* dest,
const char* from);
116 Message getNextMessage(
const char* threadName);
125 Message getNextMessage(
const char* threadName,
const char* sender);
The MSemaphore class implements a semaphore mechanism based on SDL for use with MThread.
Definition: Thread.h:107
The Messenger class is the host of all inboxes for all threads.
Definition: Messenger.h:55
Messenger()
Definition: Messenger.h:81
std::string message
Definition: Messenger.h:43
The Message struct contains methods and data necessary to transmit an useful message.
Definition: Messenger.h:41
unsigned int messageId
Definition: Messenger.h:45
static Messenger * getInstance()
Definition: Messenger.h:75
std::string sender
Definition: Messenger.h:44
void * data
Definition: Messenger.h:46