src/common/libfactory.cpp
const IModulePtr LibFactory::getModule(const std::string& id)
{
    BOOST_ASSERT(id.empty() == false);
    void *handle = NULL;
    handle = getMakeFun(id, "klk_module_get");
    BOOST_ASSERT(handle);

    typedef IModulePtr (*modfactory_func_type) (IFactory*);
    modfactory_func_type fn =
        reinterpret_cast<modfactory_func_type>(handle);
    BOOST_ASSERT(fn);

    IModulePtr res = (*fn)(m_factory);
    BOOST_ASSERT(res);

    return res;
}
// Gets module by its id from a modules description
// @param[in] id the module's id
// @return the pointer to a module or NULL if there was an error
// @note - there is an internal method that does not do any locks
Gets module by its id from a modules description
Gets module by its id from a modules description
const IModulePtr LibFactory::getModule(const std::string& id)
{
    BOOST_ASSERT(id.empty() == false);
    void *handle = NULL;
    handle = getMakeFun(id, "klk_module_get");
    BOOST_ASSERT(handle);
    typedef IModulePtr (*modfactory_func_type) (IFactory*);
    modfactory_func_type fn =
        reinterpret_cast<modfactory_func_type>(handle);
    BOOST_ASSERT(fn);
    IModulePtr res = (*fn)(m_factory);
    BOOST_ASSERT(res);
    return res;
}
const IModulePtr LibFactory :: getModule ( const std :: string & id ) { BOOST_ASSERT ( id . empty ( ) == false ) ; void * handle = NULL ; handle = getMakeFun ( id , " " ) ; BOOST_ASSERT ( handle ) ; typedef IModulePtr ( * modfactory_func_type ) ( IFactory * ) ; modfactory_func_type fn = reinterpret_cast < modfactory_func_type > ( handle ) ; BOOST_ASSERT ( fn ) ; IModulePtr res = ( * fn ) ( m_factory ) ; BOOST_ASSERT ( res ) ; return res ; }
Gets module by its id from a modules description
Gets module by its id from a modules description