Esempio n. 1
0
void MsgRouter::_broadcast( const Msg_p& pMsg )
{
    Route * pRoute = m_broadcasts.first();

    while( pRoute )
    {
        pRoute->dispatch( pMsg );
        pRoute = pRoute->next();
    }
}
Esempio n. 2
0
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();
        }
    }
}
Esempio n. 3
0
	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();
				}
			}
		}
	}