|
|||
|
|||
|
#include <dynamic.h>
Inheritance diagram for DLLFactoryBase:


Public Member Functions | |
| DLLFactoryBase (InspIRCd *Instance, const char *fname, const char *func_name=0) | |
| Default constructor. | |
| virtual | ~DLLFactoryBase () |
| Default destructor. | |
Public Attributes | |
| void *(* | factory_func )(void) |
| A function pointer to the factory function. | |
It's job is to call the init_module function and receive a factory pointer.
Definition at line 72 of file dynamic.h.
|
||||||||||||||||
|
Default constructor. This constructor loads a module file by calling its DLLManager subclass constructor, then finds the symbol using DLLManager::GetSymbol(), and calls the symbol, obtaining a valid pointer to the init_module function Definition at line 68 of file dynamic.cpp. References factory_func, DLLManager::GetSymbol(), and DLLManager::LastError(). 00068 : DLLManager(Instance, fname) 00069 { 00070 /* try get the factory function if there is no error yet */ 00071 factory_func = 0; 00072 00073 if (!LastError()) 00074 { 00075 if (!GetSymbol( (void **)&factory_func, symbol ? symbol : "init_module")) 00076 { 00077 throw ModuleException("Missing init_module() entrypoint!"); 00078 } 00079 } 00080 }
|
|
|
Default destructor.
Definition at line 82 of file dynamic.cpp.
|
|
|
A function pointer to the factory function.
Referenced by DLLFactory< T >::DLLFactory(), and DLLFactoryBase(). |