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


Public Member Functions | |
| DLLFactory (InspIRCd *Instance, const char *fname, const char *func_name) | |
| Default constructor. | |
| ReturnType * | CallInit () |
| Calls the 'init_module' C exported function within a module, which returns a pointer to a Module derived object. | |
| ~DLLFactory () | |
| The destructor deletes the ModuleFactory pointer. | |
Protected Types | |
| typedef ReturnType *( | initfunctype )(InspIRCd *) |
| This typedef represents the init_* function within each module or command. | |
Protected Attributes | |
| initfunctype * | init_func |
| Pointer to the init function. | |
| InspIRCd * | ServerInstance |
| Instance pointer to be passed to init_*() when it is called. | |
All the dirty mucking around with dl*() is done by DLLManager, all this does it put a pretty shell on it and make it nice to use to load modules and core commands. This class is quite specialised for these two uses and it may not be useful more generally -- use DLLManager directly for that.
Definition at line 98 of file dynamic.h.
|
|||||
|
This typedef represents the init_* function within each module or command. The init_module function is the only exported extern "C" declaration in any module file. In a cmd_*.cpp file the equivilant is init_command |
|
||||||||||||||||||||
|
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. Definition at line 122 of file dynamic.h. References DLLManager::GetSymbol(), and DLLManager::LastError(). |
|
|||||||||
|
The destructor deletes the ModuleFactory pointer.
|
|
|||||||||
|
Calls the 'init_module' C exported function within a module, which returns a pointer to a Module derived object.
Definition at line 143 of file dynamic.h. References ServerInstance. Referenced by ModuleManager::Load(). |
|
|||||
|
Pointer to the init function.
|
|
|||||
|
Instance pointer to be passed to init_*() when it is called.
|