26#include "messaging/message.h"
61 if (callback.GetObject<CLASS>() == obj)
73template<
class CLASS,
void (CLASS::*METHOD)(const Ptr<Messaging::Message>&)>
86#define __SingleFireCallback(CLASS, METHOD, OBJ, MSG) Messaging::MessageCallbackHandler::AddCallback<CLASS, &CLASS::METHOD>(MSG, OBJ);
87#define __AbortSingleFireCallback(MSG) Messaging::MessageCallbackHandler::AbortCallback(MSG);
88#define __AbortSingleFireCallbacks(CLASS, OBJ) Messaging::MessageCallbackHandler::AbortCallbacks<CLASS>(OBJ);
Handles asynchronous message callbacks.
Definition messagecallbackhandler.h:33
static void AbortCallbacks(CLASS *obj)
remove all message callbacks related to a class
Definition messagecallbackhandler.h:53
static void AbortCallback(const Ptr< Messaging::Message > &msg)
remove a single message callback
Definition messagecallbackhandler.cc:47
static Util::Array< Ptr< Messaging::Message > > Messages
Definition messagecallbackhandler.h:44
static Util::Array< Util::Delegate< void(const Ptr< Messaging::Message > &)> > Callbacks
Definition messagecallbackhandler.h:45
static void Update()
update messages
Definition messagecallbackhandler.cc:18
static void AddCallback(const Ptr< Messaging::Message > &msg, CLASS *obj)
setup a message callback
Definition messagecallbackhandler.h:75
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
void Append(const TYPE &first, const ELEM_TYPE &... elements)
Append multiple elements to the end of the array.
Definition array.h:1334
void EraseIndex(IndexT index)
erase element at index, keep sorting intact
Definition array.h:1036
const SizeT Size() const
get number of elements in array
Definition array.h:880
Nebula delegate class, allows to store a function, method or lambda call into a C++ object for later ...
Definition delegate.h:39
#define n_assert(exp)
Definition debug.h:50
Definition asyncport.cc:10
int IndexT
Definition types.h:48