#include <dynamic.h>
The DLLManager class is able to load a module file by filename, and locate its init_module symbol.
◆ DLLManager()
DLLManager::DLLManager |
( |
const std::string & |
name | ) |
|
Attempts to load the specified module.
- Parameters
-
name | The name of the library to load. |
◆ ~DLLManager()
DLLManager::~DLLManager |
( |
| ) |
|
Unloads the module if one was loaded.
◆ CallInit()
Module * DLLManager::CallInit |
( |
| ) |
|
Attempts to create a new module instance from this shared library.
- Returns
- Either a new instance of the Module class or NULL on error.
◆ GetSymbol() [1/2]
void * DLLManager::GetSymbol |
( |
const char * |
name | ) |
const |
Retrieves the value of the specified symbol.
- Parameters
-
name | The name of the symbol to retrieve. |
- Returns
- Either the value of the specified symbol or or NULL if it does not exist.
◆ GetSymbol() [2/2]
template<typename TReturn >
TReturn* DLLManager::GetSymbol |
( |
const char * |
name | ) |
const |
|
inline |
Retrieves the value of the specified symbol and casts it to the requested type.
- Parameters
-
name | The name of the symbol to retrieve. |
- Returns
- Either the value of the specified symbol or or NULL if it does not exist.
◆ GetVersion()
const char* DLLManager::GetVersion |
( |
| ) |
const |
|
inline |
Retrieves the module version from the dynamic library.
◆ LastError()
const std::string& DLLManager::LastError |
( |
| ) |
const |
|
inline |
Retrieves the last error which occurred or an empty string if no errors have occurred.
◆ LibraryName()
const std::string& DLLManager::LibraryName |
( |
| ) |
const |
|
inline |
Retrieves the filename of the underlying shared library.
The documentation for this class was generated from the following files: