-};
-
-/** This is the highest-level class of the DLLFactory system used to load InspIRCd modules.
- * Its job is to finally call the init_module function and obtain a pointer to a ModuleFactory.
- * This template is a container for ModuleFactory itself, so that it may 'plug' into ModuleFactory
- * and provide module loading capabilities transparently.
- */
-template <class T> class DLLFactory : public DLLFactoryBase
-{
- public:
- /** Default constructor.
- * This constructor passes its paramerers down through DLLFactoryBase and then DLLManager
- * to load the module, then calls the factory function to retrieve a pointer to a ModuleFactory
- * class. It is then down to the core to call the ModuleFactory::CreateModule() method and
- * receive a Module* which it can insert into its module lists.
- */
- DLLFactory(InspIRCd* Instance, const char *fname, const char *func_name=0) : DLLFactoryBase(Instance, fname, func_name)
- {
- if (factory_func)
- factory = reinterpret_cast<T*>(factory_func());
- else
- factory = reinterpret_cast<T*>(-1);
- }
-
- /** The destructor deletes the ModuleFactory pointer.
- */
- ~DLLFactory()
- {
- if (factory)
- delete factory;
- }