#ifndef s11n_net_s11n_CLASSLOAD_TPP_INCLUDED #define s11n_net_s11n_CLASSLOAD_TPP_INCLUDED // implementations for non-inlined code declared in classload.hpp #include #include #if s11n_CONFIG_ENABLE_PLUGINS # include #endif #include template InterfaceBase * ::s11n::cl::object_factory::operator()( const std::string & key ) const { try { typedef ::s11n::fac::factory_mgr FacMgr; FacMgr & fm = FacMgr::instance(); #if s11n_CONFIG_ENABLE_PLUGINS // Attempt a DLL lookup if the class isn't already registered. if( ! fm.provides( key ) ) { using namespace ::s11n::debug; S11N_TRACE(TRACE_FACTORY_PLUGINS) << "Factory does not provide '"< InterfaceBase * ::s11n::cl::classload( const std::string key ) { using namespace ::s11n::debug; S11N_TRACE(TRACE_FACTORY) << "classload("<::type IT; return object_factory()( key ); } template void ::s11n::cl::classloader_register( const std::string & classname, InterfaceBase * (*factory_func)() ) { using namespace ::s11n::debug; S11N_TRACE(TRACE_FACTORY_REG) << "classloader_register("<().register_factory( classname, factory_func ); } #endif // s11n_net_s11n_CLASSLOAD_TPP_INCLUDED