src/client/moduleprocessor.cpp
const std::string ModuleProcessor::getReceiverAppID(const std::string& msgid) const
{
    ModuleList modules =
        m_factory->getModuleFactory()->getModules();
    for (ModuleList::iterator mod = modules.begin();
         mod != modules.end(); mod++)
    {
        cli::ICommandList list = (*mod)->getCLIInfo();
        for (cli::ICommandList::iterator j = list.begin();
             j != list.end(); j++)
        {
            if ((*j)->getMessageID() == msgid)
            {
                return (*mod)->getType() == klk::mod::APP ? (*mod)->getID() :
                    MODULE_COMMON_ID;
            }
        }
    }

    // FIXME!!! bad code
    BOOST_ASSERT(false);
    return MODULE_COMMON_ID;
}
// Retrives the destination module id (main application module)
// the CLI command to be sent
Retrives the destination module id (main application module)
the CLI command to be sent
Retrives the destination module id ( main application module ) the CLI command to be sent
const std::string ModuleProcessor::getReceiverAppID(const std::string& msgid) const
{
    ModuleList modules =
        m_factory->getModuleFactory()->getModules();
    for (ModuleList::iterator mod = modules.begin();
         mod != modules.end(); mod++)
    {
        cli::ICommandList list = (*mod)->getCLIInfo();
        for (cli::ICommandList::iterator j = list.begin();
             j != list.end(); j++)
        {
            if ((*j)->getMessageID() == msgid)
            {
                return (*mod)->getType() == klk::mod::APP ? (*mod)->getID() :
                    MODULE_COMMON_ID;
            }
        }
    }
    BOOST_ASSERT(false);
    return MODULE_COMMON_ID;
}
const std :: string ModuleProcessor :: getReceiverAppID ( const std :: string & msgid ) const { ModuleList modules = m_factory -> getModuleFactory ( ) -> getModules ( ) ; for ( ModuleList :: iterator mod = modules . begin ( ) ; mod != modules . end ( ) ; mod ++ ) { cli :: ICommandList list = ( * mod ) -> getCLIInfo ( ) ; for ( cli :: ICommandList :: iterator j = list . begin ( ) ; j != list . end ( ) ; j ++ ) { if ( ( * j ) -> getMessageID ( ) == msgid ) { return ( * mod ) -> getType ( ) == klk :: mod :: APP ? ( * mod ) -> getID ( ) : MODULE_COMMON_ID ; } } } BOOST_ASSERT ( false ) ; return MODULE_COMMON_ID ; }
Retrives the destination module id (main application module)
the CLI command to be sent
Retrives the destination module id ( main application module ) the CLI command to be sent
// FIXME!!! bad code