void MsgRouter::_broadcast( const Msg_p& pMsg ) { Route * pRoute = m_broadcasts.first(); while( pRoute ) { pRoute->dispatch( pMsg ); pRoute = pRoute->next(); } }
void MsgRouter::_dispatchToTypeRoutes( const Msg_p& pMsg ) { auto it = m_typeRoutes.find(pMsg->type()); if( it != m_typeRoutes.end() ) { Route * pRoute = it->second.first(); while( pRoute ) { pRoute->dispatch( pMsg ); pRoute = pRoute->next(); } } }
void MsgRouter::_dispatchToSourceRoutes( const Msg_p& pMsg ) { Object * pSource = pMsg->sourceRawPtr(); if( pSource ) { auto it = m_sourceRoutes.find(Object_wp(pSource)); if( it != m_sourceRoutes.end() ) { Route * pRoute = it->second.first(); while( pRoute ) { pRoute->dispatch( pMsg ); pRoute = pRoute->next(); } } } }