#include <string>
#include <map>
#include <functional>
#include <s11n.net/s11n/export.hpp>
#include <s11n.net/s11n/phoenix.hpp>
Go to the source code of this file.
Namespaces | |
namespace | s11n |
namespace | s11n::sharing |
namespace | s11n::fac |
namespace | s11n::fac::Detail |
Classes | |
struct | s11n::sharing::factory_context |
Internal marker type. More... | |
struct | s11n::fac::create_hook< T, SubT > |
create_hook is a helper object factory for the factory_mgr API. More... | |
class | s11n::fac::aliaser< AliasedType > |
A helper class to alias one token to another. More... | |
class | s11n::fac::factory_mgr< InterfaceT, KeyType > |
The factory_mgr class is essentially a static classloader, capable of loading classes by using registered factories for a given set of keys (e.g., class names). More... | |
Defines | |
#define | s11n_net_s11n_FACTORY_H_INCLUDED 1 |
Functions | |
template<typename InterfaceT> | |
factory_mgr < InterfaceT, std::string > & | s11n::fac::factory () |
Returns factory_mgr<InterfaceT, std::string>::instance(). | |
template<typename InterfaceT> | |
void | s11n::fac::register_factory (const std::string &classname, InterfaceT *(*factory_function)()) |
Registers classname with InterfaceT using the given factory. | |
template<typename InterfaceT> | |
void | s11n::fac::register_factory (const std::string &classname) |
Registers classname with InterfaceT using a default factory: create_hook<InterfaceT,ImplT>::create(). | |
template<typename InterfaceT, typename ImplT> | |
void | s11n::fac::register_subtype (const std::string &classname) |
Registers a factory creating ImplT objects with the InterfaceT classloader using a default factory. | |
template<typename T> | |
T * | s11n::fac::Detail::null_factory () |
Always returns 0. | |
template<typename InterfaceT> | |
void | s11n::fac::register_abstract (const std::string &classname) |
Registers a no-op factory for the given name and InterfaceT. | |
template<typename InterfaceT> | |
InterfaceT * | s11n::fac::create (const std::string &classname) |
Returns the same as factory<InterfaceT>().create( classname ). |
#define s11n_net_s11n_FACTORY_H_INCLUDED 1 |
Definition at line 2 of file factory.hpp.