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

Method dumpSubscribers

Engine/source/util/messaging/eventManager.cpp:390–408  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Print the subscribers to an event. @param event The event whose subscribers are to be printed. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

388/// @param event The event whose subscribers are to be printed.
389//-----------------------------------------------------------------------------
390void EventManager::dumpSubscribers( const char* event )
391{
392 Vector<EventManagerListener::Subscriber>* subscribers = mListener.mSubscribers.retreive( event );
393 if( !subscribers )
394 {
395 Con::warnf( "EventManager::dumpSubscriber - %s is not a valid event.", event );
396 return;
397 }
398
399 Con::printf( "%s Subscribers", event );
400 for( Vector<EventManagerListener::Subscriber>::const_iterator iter = subscribers->begin(); iter != subscribers->end(); iter++ )
401 if( iter->listener )
402 {
403 // Grab the best fit name. This should be the first found of name, class, superclass, or class type.
404 Namespace* ns = iter->listener->getNamespace();
405 const char* name = ns ? ns->mName : getClassName() ;
406 Con::printf( " %s -> %s", name, iter->callback );
407 }
408}
409
410//-----------------------------------------------------------------------------
411/// Print all registered events and their subscribers to the console.

Callers 2

eventManager.cppFile · 0.80
printEventManagersMethod · 0.80

Calls 6

printfFunction · 0.85
getNamespaceMethod · 0.80
warnfFunction · 0.50
retreiveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected