Nebula
|
#include <delegatetable.h>
Associates message ids with handler delegates.
One message id may be associated with any number of handler functions. The order of handler functions for one message id will be preserved.
Public Member Functions | |
template<class CLASS , void(CLASS::*)(const Ptr< Message > &) METHOD> | |
void | Bind (const Id &msgId, CLASS *obj) |
bind a message id to a method call | |
bool | Invoke (const Ptr< Message > &msg) |
invoke delegates bound to msg, returns false if no delegates bound to msg id | |
Private Member Functions | |
void | AddDelegate (const Id &msgId, const Util::Delegate< void(const Ptr< Message > &)> &del) |
add a delegate | |
Private Attributes | |
Util::Array< Util::Array< Util::Delegate< void(const Ptr< Message > &)> > > | delegateArray |
Util::Dictionary< const Id *, IndexT > | idIndexMap |
|
private |
add a delegate
void Messaging::DelegateTable::Bind | ( | const Id & | msgId, |
CLASS * | obj ) |
bind a message id to a method call
invoke delegates bound to msg, returns false if no delegates bound to msg id
|
private |
|
private |