16#include "messaging/message.h"
25 template<
class CLASS,
void (CLASS::*METHOD)(const Ptr<Message>&)>
void Bind(
const Id& msgId, CLASS* obj);
40template<
class CLASS,
void (CLASS::*METHOD)(const Ptr<Message>&)>
Associates message ids with handler delegates.
Definition delegatetable.h:22
bool Invoke(const Ptr< Message > &msg)
invoke delegates bound to msg, returns false if no delegates bound to msg id
Definition delegatetable.cc:37
Util::Array< Util::Array< Util::Delegate< void(const Ptr< Message > &)> > > delegateArray
Definition delegatetable.h:33
void Bind(const Id &msgId, CLASS *obj)
bind a message id to a method call
Definition delegatetable.h:42
Util::Dictionary< const Id *, IndexT > idIndexMap
Definition delegatetable.h:34
void AddDelegate(const Id &msgId, const Util::Delegate< void(const Ptr< Message > &)> &del)
add a delegate
Definition delegatetable.cc:17
A message identifier.
Definition id.h:19
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
Nebula delegate class, allows to store a function, method or lambda call into a C++ object for later ...
Definition delegate.h:39
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
Definition asyncport.cc:10