a DLL/so plug-in loaded explicitly at runtime.
More...
#include <PluginLoader.hpp>
|
static void * | LoadLibraryS (const char *pcDllname, int iMode=2) |
|
static void * | GetProcAddressS (void *Lib, const char *Fnname) |
|
static bool | FreeLibraryS (void *hDLL) |
|
a DLL/so plug-in loaded explicitly at runtime.
This is a header only file.
§ CPluginLoader()
ParaEngine::CPluginLoader::CPluginLoader |
( |
const char * |
filename = NULL | ) |
|
|
inline |
the dll to load, it does not load it immediately.
§ Activate()
int ParaEngine::CPluginLoader::Activate |
( |
int |
nType = 0 , |
|
|
void * |
pVoid = NULL |
|
) |
| |
|
inline |
Activate the DLL.
- Parameters
-
nType | type of the activation |
- See also
- PluginActivationType
- Parameters
-
pVoid | any data associated with the type |
- Returns
- : E_FAIL if not succeeded.
§ GetClassDescriptor()
The plugin must provide the system with a way to retrieve the Class Descriptors defined by the plugin.
Class descriptors provide the system with information about the plugin classes in the DLL. The function LibClassDesc(i) allows the system to access the class descriptors. A DLL may have several class descriptors, one for each plugin class. The function should return a pointer to the 'i-th' class descriptor.
§ GetDLLFilePath()
const char* ParaEngine::CPluginLoader::GetDLLFilePath |
( |
| ) |
|
|
inline |
- Returns
- dll file path. this is the same as the asset entity key.
§ GetLibDescription()
const char* ParaEngine::CPluginLoader::GetLibDescription |
( |
| ) |
|
|
inline |
When a plugin file is loaded that contains an entity that the system does not have access to (i.e.
the DLL is not available), a message is presented to the user. The system requires that each DLL return a text string to present to the user if it is unavailable.
- Returns
- return the dll description string.
§ Init()
void ParaEngine::CPluginLoader::Init |
( |
const char * |
sFilename | ) |
|
|
inline |
init the asset entity object.
- Parameters
-
§ IsValid()
bool ParaEngine::CPluginLoader::IsValid |
( |
| ) |
|
|
inline |
whether the plugin loaded is valid.
§ UnLoad()
void ParaEngine::CPluginLoader::UnLoad |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: