MercuryMessageSubscription Class Reference

Subscription for messages. More...

#include <MercuryMessages.h>

Collaboration diagram for MercuryMessageSubscription:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Subscription for messages.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void MercuryMessageSubscription::Subscribe ( const MString name,
MercuryCallback  cb 
)

Subscribe.

Definition at line 131 of file MercuryMessages.cpp.

void MercuryMessageSubscription::Unsubscribe (  ) 

Unsubscribe. If unsubscribed already, nothing bad will happen.

Definition at line 120 of file MercuryMessages.cpp.


Member Data Documentation

MString MercuryMessageSubscription::m_sName [private]

Definition at line 93 of file MercuryMessages.h.

MercuryCallback MercuryMessageSubscription::m_pCallback [private]

Definition at line 94 of file MercuryMessages.h.


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