#include <classload.hpp>
Public Types | |
typedef InterfaceBase | base_type |
Same as InterfaceBase. | |
Public Member Functions | |
base_type * | operator() (const std::string &key) const |
The default implementation returns s11n::fac::factory<InterfaceBase>().create(key). |
Clients may specialize this to return objects from their own factories. By default it uses s11n::fac's mini-framework, and thus can load any type registered with that API.
Definition at line 58 of file classload.hpp.
|
Same as InterfaceBase.
Definition at line 61 of file classload.hpp. |
|
The default implementation returns s11n::fac::factory<InterfaceBase>().create(key). The caller owns the returned pointer, which may be 0. If the underlying factory does not have the requested class and s11n is built with the s11n::plugin layer, then s11n::plugin::open(classname) is used to search for a DLL. Under the s11n classloader model, opening a plugin will register classes defined in the plugin back with the factory. This function propagates exceptions if the underlying factory's create() feature throws. a) s11n_exceptions are passed on as-is. b) std::exceptions are translated to s11n::factory_exceptions, keeping the what() text. c) Unknown exceptions (...) are translated to s11n::factory_exceptions with an unspecified non-empty what() text. Definition at line 91 of file classload.hpp. References s11n::plugin::dll_error(), s11nlite::instance(), s11n::plugin::open(), S11N_TRACE, and s11n::debug::TRACE_FACTORY_PLUGINS. |