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

Method dumpSubscribers

Engine/source/util/messaging/eventManager.cpp:389–407  ·  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

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

Callers 2

eventManager.cppFile · 0.80
printEventManagersMethod · 0.80

Calls 6

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

Tested by

no test coverage detected