122 virtual void tick(
double dt) = 0;
205#define ASSERT_TYPE(msg, MsgType, msgCast) \
206 DtASSERT(dynamic_cast<MsgType*>(msg), "Message is incorrect type"); \
207 MsgType* msgCast = static_cast<MsgType*>(msg);
217#define ASSERT_TYPE_NO_CAST(msg, MsgType) DtASSERT(dynamic_cast<MsgType*>(msg), "Message is incorrect type");
Provides assertion macros and functions for error detection and handling.
Factory for creating VREngage messages from serialized data.
Definition vreMessageFactory.h:48
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
static DtVreMessageManager * theVreMessageManager
Singleton instance of the message manager.
Definition vreMessageManager.h:181
virtual void queueMessage(DtVreMessage *msg, double delay=0.0)=0
Queues a message for later dispatch.
virtual const EventStats & stats()=0
Gets the event statistics for the current thread.
static DtVreMessageManager & instance()
Gets the singleton instance of the message manager.
DtVreMessageManager()
Protected constructor.
virtual void sendMessage(DtVreMessage *msg)=0
Immediately dispatches a message.
virtual DtVreMessageFactory & factory()=0
Gets the message factory associated with this message manager.
virtual ~DtVreMessageManager()
Virtual destructor.
static DtVreMessageFactory * theMessageFactory
Message factory for creating messages.
Definition vreMessageManager.h:188
virtual void tick(double dt)=0
Processes queued messages for the current thread.
virtual void addHandler(const std::string &messageType, const DtVreMessageDelegate &handler, HandlerPosition handlerPos=HandlerPosition::BACK)=0
Registers a message handler for a specific message type.
virtual void init()=0
Initializes the message manager.
HandlerPosition
Position for adding a message handler in the handler list.
Definition vreMessageManager.h:62
@ BACK
Add the handler at the back of the list (called last)
Definition vreMessageManager.h:64
@ FRONT
Add the handler at the front of the list (called first)
Definition vreMessageManager.h:63
virtual void removeHandler(const std::string &messageType, const DtVreMessageDelegate &handler)=0
Unregisters a message handler for a specific message type.
Defines export macros for the VREngage Message Manager library.
#define MESSAGEMANAGER_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
DtDelegate< DtVreMessageResult, DtVreMessage * > DtVreMessageDelegate
Delegate type for message handler callbacks.
Definition vreMessage.h:212
Statistics for message dispatching.
Definition vreMessageManager.h:48
std::vector< std::string > messageTypesDispatched
List of message types that were dispatched.
Definition vreMessageManager.h:53
int messagesDispatchedThisFrame
Number of messages dispatched in the current frame.
Definition vreMessageManager.h:50
Defines the base class for all VREngage messages.