#include <MercuryMessages.h>
Collaboration diagram for MercuryMessageSubscription:
Public Member Functions | |
MercuryMessageSubscription () | |
MercuryMessageSubscription (const MString &name, MercuryCallback cb) | |
~MercuryMessageSubscription () | |
void | Subscribe (const MString &name, MercuryCallback cb) |
Subscribe. | |
void | Unsubscribe () |
Unsubscribe. If unsubscribed already, nothing bad will happen. | |
Private Attributes | |
MString | m_sName |
MercuryCallback | m_pCallback |
This may seem redundant to have a class to handle your subscriptions if it's only a front end for the MESSAGEMAN. It's NOT! You should always set the scope of your MercuryMessageSubscription to be that of the function that is being subscribed. That way you will NEVER have MESSAGEMMAN call a non-existant function.
Definition at line 82 of file MercuryMessages.h.
MercuryMessageSubscription::MercuryMessageSubscription | ( | ) |
Definition at line 102 of file MercuryMessages.cpp.
MercuryMessageSubscription::MercuryMessageSubscription | ( | const MString & | name, | |
MercuryCallback | cb | |||
) |
Definition at line 108 of file MercuryMessages.cpp.
MercuryMessageSubscription::~MercuryMessageSubscription | ( | ) |
Definition at line 115 of file MercuryMessages.cpp.
void MercuryMessageSubscription::Subscribe | ( | const MString & | name, | |
MercuryCallback | cb | |||
) |
void MercuryMessageSubscription::Unsubscribe | ( | ) |
Unsubscribe. If unsubscribed already, nothing bad will happen.
Definition at line 120 of file MercuryMessages.cpp.
MString MercuryMessageSubscription::m_sName [private] |
Definition at line 93 of file MercuryMessages.h.
Definition at line 94 of file MercuryMessages.h.