13#include "messaging/message.h"
32#define __Dispatch(OBJCLASS,OBJ,MSG) Messaging::StaticMessageHandler::Dispatch<OBJCLASS>(OBJ, MSG)
33#define __Dispatcher(OBJCLASS) template<> void Messaging::StaticMessageHandler::Dispatch(const Ptr<OBJCLASS>& obj, const Ptr<Messaging::Message>& msg)
34#define __Handle(OBJCLASS,MSGCLASS) if (msg->CheckId(MSGCLASS::Id)) { Messaging::StaticMessageHandler::Handle<OBJCLASS,MSGCLASS>(obj, msg.downcast<MSGCLASS>()); return; }
35#define __StaticHandle(MSGCLASS) if (msg->CheckId(MSGCLASS::Id)) { Messaging::StaticMessageHandler::Handle<MSGCLASS>(msg.downcast<MSGCLASS>()); return true; }
36#define __HandleByRTTI(OBJCLASS,MSGCLASS) if (msg->IsA(MSGCLASS::RTTI)) { Messaging::StaticMessageHandler::Handle<OBJCLASS,MSGCLASS>(obj, msg.downcast<MSGCLASS>()); return; }
37#define __HandleUnknown(SUPERCLASS) { Messaging::StaticMessageHandler::Dispatch<SUPERCLASS>(obj.upcast<SUPERCLASS>(), msg); }
38#define __Handler(OBJCLASS,MSGCLASS) template<> void Messaging::StaticMessageHandler::Handle<OBJCLASS,MSGCLASS>(const Ptr<OBJCLASS>& obj, const Ptr<MSGCLASS>& msg)
39#define __StaticHandler(MSGCLASS) template<> void Messaging::StaticMessageHandler::Handle<MSGCLASS>(const Ptr<MSGCLASS>& msg)
42#define __StaticSend(INTERFACECLASS, MSG) INTERFACECLASS::Instance()->Send(MSG.downcast<Messaging::Message>())
43#define __StaticSendWait(INTERFACECLASS, MSG) INTERFACECLASS::Instance()->SendWait(MSG.downcast<Messaging::Message>())
46#define __Send(OBJ, MSG) OBJ->Send(MSG.downcast<Graphics::GraphicsEntityMessage>())
Implements a simple, static message handler helper class.
Definition staticmessagehandler.h:19
static void Dispatch(const Ptr< OBJTYPE > &object, const Ptr< Message > &msg)
dispatch a message to handling method
static void Handle(const Ptr< MSGTYPE > &msg)
a handler method without object association
static void Handle(const Ptr< OBJTYPE > &object, const Ptr< MSGTYPE > &msg)
a handler method with object association
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition asyncport.cc:10