1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
21 typedef void * (initfunc) (void);
23 #include "inspircd_config.h"
28 DLLManager(char *fname);
29 virtual ~DLLManager();
33 bool GetSymbol( initfunc* &v, char *sym_name );
35 bool GetSymbol( void **, char *sym_name );
47 char staticname[1024];
52 class DLLFactoryBase : public DLLManager
55 DLLFactoryBase(char *fname, char *func_name = 0);
56 virtual ~DLLFactoryBase();
58 initfunc *factory_func;
60 void * (*factory_func)(void);
65 template <class T> class DLLFactory : public DLLFactoryBase
68 DLLFactory(char *fname, char *func_name=0) : DLLFactoryBase(fname,func_name)
71 factory = (T*)factory_func();