MercuryMessageManager Class Reference

Message Manager (accessable via MESSAGEMAN.). More...

#include <MercuryMessages.h>

Collaboration diagram for MercuryMessageManager:

Collaboration graph
[legend]
List of all members.

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< PostDatam_mPostCodes
float m_fTotalTime
MercuryThread m_thread
MercuryMutex m_mutexCallback
MercuryMutex m_mutexPost

Classes

struct  PostData

Detailed Description

Message Manager (accessable via MESSAGEMAN.).

Definition at line 18 of file MercuryMessages.h.


Constructor & Destructor Documentation

MercuryMessageManager::MercuryMessageManager (  ) 

Definition at line 23 of file MercuryMessages.cpp.


Member Function Documentation

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::BroadcastMessage ( const MString name,
const PStack args 
)

Broadcast message to system immediately.

Definition at line 29 of file MercuryMessages.cpp.

void MercuryMessageManager::PostSystemMessage ( const MString name,
const PStack args,
float  fTimeInFuture = 0 
)

Post message for future use.

Definition at line 75 of file MercuryMessages.cpp.

void MercuryMessageManager::Update ( float  fDeltaTime  ) 

[internal] Update

Definition at line 81 of file MercuryMessages.cpp.

void MercuryMessageManager::SetupThread (  )  [inline]

Definition at line 38 of file MercuryMessages.h.


Member Data Documentation

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.

MercuryMutex MercuryMessageManager::m_mutexCallback [private]

Definition at line 67 of file MercuryMessages.h.

MercuryMutex MercuryMessageManager::m_mutexPost [private]

Definition at line 68 of file MercuryMessages.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo