-template <class T> class DLLFactory : public DLLFactoryBase
-{
- public:
- 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);
- }
-
- ~DLLFactory()
- {
- if (factory)
- delete factory;
- }