MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setMessageQueue

Method setMessageQueue

Engine/source/util/messaging/eventManager.cpp:136–153  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Registers the message queue and listener with the messaging system. @param queue The name of the queue. Set to "" to destroy the queue. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

134/// @param queue The name of the queue. Set to "" to destroy the queue.
135//-----------------------------------------------------------------------------
136void EventManager::setMessageQueue( const char* queue )
137{
138 // If a queue is already registered, unregister it.
139 if( mQueue && Dispatcher::isQueueRegistered( mQueue ) )
140 {
141 unregisterAllEvents();
142 Dispatcher::unregisterMessageListener( mQueue, &mListener );
143 Dispatcher::unregisterMessageQueue( mQueue );
144 }
145
146 // Register the new queue.
147 if( queue && *queue )
148 {
149 Dispatcher::registerMessageQueue( queue );
150 Dispatcher::registerMessageListener( queue, &mListener );
151 mQueue = StringTable->insert( queue );
152 }
153}
154
155//-----------------------------------------------------------------------------
156/// Determines whether or not an event is registered with the EventManager.

Callers 2

getEventManagerMethod · 0.80
_setMessageQueueMethod · 0.80

Calls 6

isQueueRegisteredFunction · 0.85
unregisterMessageQueueFunction · 0.85
registerMessageQueueFunction · 0.85
registerMessageListenerFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected