Nebula
Loading...
Searching...
No Matches
staticmessagehandler.h File Reference
#include "messaging/message.h"

Go to the source code of this file.

Classes

class  Messaging::StaticMessageHandler
 Implements a simple, static message handler helper class. More...
 

Namespaces

namespace  Messaging
 

Macros

#define __Dispatch(OBJCLASS, OBJ, MSG)
 
#define __Dispatcher(OBJCLASS)
 
#define __Handle(OBJCLASS, MSGCLASS)
 
#define __StaticHandle(MSGCLASS)
 
#define __HandleByRTTI(OBJCLASS, MSGCLASS)
 
#define __HandleUnknown(SUPERCLASS)
 
#define __Handler(OBJCLASS, MSGCLASS)
 
#define __StaticHandler(MSGCLASS)
 
#define __StaticSend(INTERFACECLASS, MSG)
 
#define __StaticSendWait(INTERFACECLASS, MSG)
 
#define __Send(OBJ, MSG)
 

Macro Definition Documentation

◆ __Dispatch

#define __Dispatch ( OBJCLASS,
OBJ,
MSG )
Value:
static void Dispatch(const Ptr< OBJTYPE > &object, const Ptr< Message > &msg)
dispatch a message to handling method

◆ __Dispatcher

#define __Dispatcher ( OBJCLASS)
Value:
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38

◆ __Handle

#define __Handle ( OBJCLASS,
MSGCLASS )
Value:
if (msg->CheckId(MSGCLASS::Id)) { Messaging::StaticMessageHandler::Handle<OBJCLASS,MSGCLASS>(obj, msg.downcast<MSGCLASS>()); return; }
static void Handle(const Ptr< OBJTYPE > &object, const Ptr< MSGTYPE > &msg)
a handler method with object association

◆ __HandleByRTTI

#define __HandleByRTTI ( OBJCLASS,
MSGCLASS )
Value:
if (msg->IsA(MSGCLASS::RTTI)) { Messaging::StaticMessageHandler::Handle<OBJCLASS,MSGCLASS>(obj, msg.downcast<MSGCLASS>()); return; }

◆ __Handler

#define __Handler ( OBJCLASS,
MSGCLASS )

◆ __HandleUnknown

#define __HandleUnknown ( SUPERCLASS)
Value:
{ Messaging::StaticMessageHandler::Dispatch<SUPERCLASS>(obj.upcast<SUPERCLASS>(), msg); }

◆ __Send

#define __Send ( OBJ,
MSG )
Value:
OBJ->Send(MSG.downcast<Graphics::GraphicsEntityMessage>())

◆ __StaticHandle

#define __StaticHandle ( MSGCLASS)
Value:
if (msg->CheckId(MSGCLASS::Id)) { Messaging::StaticMessageHandler::Handle<MSGCLASS>(msg.downcast<MSGCLASS>()); return true; }

◆ __StaticHandler

#define __StaticHandler ( MSGCLASS)

◆ __StaticSend

#define __StaticSend ( INTERFACECLASS,
MSG )
Value:
INTERFACECLASS::Instance()->Send(MSG.downcast<Messaging::Message>())
Messages are packets of data which can be sent to a message port.
Definition message.h:45

◆ __StaticSendWait

#define __StaticSendWait ( INTERFACECLASS,
MSG )
Value:
INTERFACECLASS::Instance()->SendWait(MSG.downcast<Messaging::Message>())