#include <MercuryMessages.h>
Collaboration diagram for MercuryMessageManager:
Public Member Functions | |
MercuryMessageManager () | |
void | Subscribe (const MString &name, MercuryCallback cb) |
Subscribe the given callback cb to the subscripton name. | |
void | Unsubscribe (const MString &name, MercuryCallback cb) |
Unsubscribe the given callback cb to the subscripton name. | |
void | BroadcastMessage (const MString &name, const PStack &args) |
Broadcast message to system immediately. | |
void | PostSystemMessage (const MString &name, const PStack &args, float fTimeInFuture=0) |
Post message for future use. | |
void | Update (float fDeltaTime) |
[internal] Update | |
void | SetupThread () |
Private Attributes | |
volatile std::map< MString, MVector< MercuryCallback > > | m_mCallbacks |
volatile MHeap< PostData > | m_mPostCodes |
float | m_fTotalTime |
MercuryThread | m_thread |
MercuryMutex | m_mutexCallback |
MercuryMutex | m_mutexPost |
Classes | |
struct | PostData |
Definition at line 18 of file MercuryMessages.h.
MercuryMessageManager::MercuryMessageManager | ( | ) |
Definition at line 23 of file MercuryMessages.cpp.
void MercuryMessageManager::Subscribe | ( | const MString & | name, | |
MercuryCallback | cb | |||
) |
Subscribe the given callback cb to the subscripton name.
Definition at line 56 of file MercuryMessages.cpp.
void MercuryMessageManager::Unsubscribe | ( | const MString & | name, | |
MercuryCallback | cb | |||
) |
Unsubscribe the given callback cb to the subscripton name.
Definition at line 61 of file MercuryMessages.cpp.
void MercuryMessageManager::Update | ( | float | fDeltaTime | ) |
void MercuryMessageManager::SetupThread | ( | ) | [inline] |
Definition at line 38 of file MercuryMessages.h.
volatile std::map< MString, MVector< MercuryCallback > > MercuryMessageManager::m_mCallbacks [private] |
Definition at line 57 of file MercuryMessages.h.
volatile MHeap< PostData > MercuryMessageManager::m_mPostCodes [private] |
Definition at line 58 of file MercuryMessages.h.
float MercuryMessageManager::m_fTotalTime [private] |
Definition at line 61 of file MercuryMessages.h.
MercuryThread MercuryMessageManager::m_thread [private] |
Definition at line 63 of file MercuryMessages.h.
Definition at line 67 of file MercuryMessages.h.
Definition at line 68 of file MercuryMessages.h.